login
The 10^n-th 3-almost prime.
2

%I #2 Mar 30 2012 17:31:20

%S 8,45,412,3918,38991,395085,4046429,41657362,429891626,4439956573,

%T 45851698382,473238120286,4880292241955,50280826966354

%N The 10^n-th 3-almost prime.

%t ThreeAlmostPrimePi[n_] := Sum[ PrimePi[n/(Prime@i*Prime@j)] - j + 1, {i, PrimePi[n^(1/3)]}, {j, i, PrimePi@ Sqrt[n/Prime@i]}]; ThreeAlmostPrime[n_] := Block[{e = Floor[Log[2, n]], a, b}, a = 2^e; Do[b = 2^p; While[ThreeAlmostPrimePi[a] < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; Do[ Print@ThreeAlmostPrime[10^n], {n, 0, 13}]

%t ThreePrime[n_] := Block[{e = Floor[ Log[2, n] +2], a, b}, a = 2^e; Do[b = 2^p; While[ ThreePrimePi[a] < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; Table[ ThreePrime[n], {n, 0, 13}]

%Y Cf. A109251, A006988, A114125, A120045, A120046.

%K more,nonn

%O 0,1

%A _Robert G. Wilson v_, Feb 15 2006