Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A121053
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A121053 A sequence S describing the position of its prime terms. +0
5
2, 3, 5, 1, 7, 8, 11, 13, 10, 17, 19, 14, 23, 29, 16, 31, 37, 20, 41, 43, 22, 47, 53, 25, 59, 27, 61, 30, 67, 71, 73, 33, 79, 35, 83, 38, 89, 97, 40, 101 (list; graph; listen)
OFFSET

1,1

COMMENT

S reads like this:

"At position 2, there is a prime in S" [indeed, this is 3]

"At position 3, there is a prime in S" [indeed, this is 5]

"At position 5, there is a prime in S" [indeed, this is 7]

"At position 1, there is a prime in S" [indeed, this is 2]

"At position 7, there is a prime in S" [indeed, this is 11]

"At position 8, there is a prime in S" [indeed, this is 13]

"At position 11, there is a prime in S" [indeed, this is 19]

"At position 13, there is a prime in S" [indeed, this is 23]

"At position 10, there is a prime in S" [indeed, this is 17], etc.

S is built with this rule: when you are about to write a term of S, always use the smallest integer not yet present in S and not leading to a contradiction.

Thus one cannot start with 1; this would read: "At position 1, there is a prime number in S" [no, 1 is not a prime]

So start S with 2 and the rest follows smoothly.

S contains all the primes and they appear in their natural order.

Does the ratio primes/composites in S tend to a limit? Answer (from Dean Hickerson): Yes, to 1/2.

Comments from Dean Hickerson, Aug 11 2006: (Start) In the limit, exactly half of the terms are primes. Here's a formula, found empirically, for a(n) for n>=5:

Let pi(n) be the number of primes <= n and p(n) be the n'th prime. Then:

- if n is prime or (n is composite and n+pi(n) is even) then a(n) = p(floor((n+pi(n))/2));

- if n is composite and n+pi(n) is odd and n+1 is composite then a(n) = n+1;

- if n is composite and n+pi(n) is odd and n+1 is prime then a(n) = n+2.

Also, for n>=5, n is in the sequence iff either n is prime or n+pi(n) is even.

(This could all be proved by induction on n.)

It follows from this that, for n>=4, the number of primes among a(1), ..., a(n) is exactly floor((n+pi(n))/2. Since pi(n)/n -> 0 as n -> infinity, this is asymptotic to n/2. (End)

LINKS

Kerry Mitchell, Table of n, a(n) for n = 1..1000

Eric Angelini, About this sequence

CROSSREFS

Cf. A105753.

Sequence in context: A105870 A096534 A139047 this_sequence A132597 A030335 A030790

Adjacent sequences: A121050 A121051 A121052 this_sequence A121054 A121055 A121056

KEYWORD

nonn,nice

AUTHOR

Eric Angelini (eric.angelini(AT)kntv.be), Aug 10 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 30 13:13 EST 2009. Contains 167758 sequences.


AT&T Labs Research