A sequence describing the position of its prime terms

n is the position of an integer in the sequence (its rank)

S is the sequence:

n= 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

S= 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,...

« 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 build 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.

« 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.

My question is: does the ratio primes/composites in S tend to a limit (or is this as difficult to find as the ratio primes/naturals?)

If I did not mistake (by hand), I get those small results:

- for the first  50 integers of S, 32 primes, 18 comp.

- for the first 100 integers of S, 62 primes, 38 comp.

- for the first 150 integers of S, 92 primes, 58 comp.

...

If S is of interest, I’ll submit it to the OEIS at the end of the month.

Best,

É.

P.-S.1

One can start S with any integer. I suspect this doesn’t affect the said ratio.

P.-S.2

This sequence is now in the OEIS (august 10th, 2006), thanks to Neil. It is A121053.