login
A120044
The 10^n-th 3-almost prime.
2
8, 45, 412, 3918, 38991, 395085, 4046429, 41657362, 429891626, 4439956573, 45851698382, 473238120286, 4880292241955, 50280826966354
OFFSET
0,1
MATHEMATICA
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}]
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}]
CROSSREFS
KEYWORD
more,nonn
AUTHOR
Robert G. Wilson v, Feb 15 2006
STATUS
approved