OFFSET
1,2
COMMENTS
a(1)=1; on places 2,4,6,8,... we put primes (A000040); on places 3,7,11,15,... we put products of two primes (A001358); on places 5,13,21,29,... we put products of three primes (A014612); on places 9,25,41,57,... we put products of four primes (A014613); on places 17,49,81,... we put products of five primes (A014614); etc.
Primes with the index not exceeding n have density 1/2, semiprimes have density 1/4, etc.
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..8192
FORMULA
MATHEMATICA
mx = 72; a = Array[1 &, mx]; cnt = mx - 1; offs = Table[2^(i - 1) + 1, {i, 1, mx}]; n = 1; While[cnt > 0, n++; idx = PrimeOmega[n]; pos = offs[[idx]]; If[pos > mx, Continue[]]; offs[[idx]] += 2^idx; a[[pos]] = n; cnt--]; a (* Ivan Neretin, May 06 2015 *)
CROSSREFS
Cf. A057114.
KEYWORD
nonn
AUTHOR
Vladimir Shevelev and Peter J. C. Moses, Feb 20 2012
STATUS
approved