OFFSET
1,2
EXAMPLE
a(1) = floor(2/2) = floor(1) = 1.
a(2) = floor(12/6) = floor(2) = 2.
a(3) = floor(216/30) = floor(7.2) = 7.
a(4) = floor(8640/210) = floor(41.1428571) = 41.
a(5) = floor(933120/2310) = floor(403.948052) = 403.
a(6) = floor(209018880/30030) = floor(6960.33566) = 6960.
MATHEMATICA
AlmostPrimePi[k_Integer, n_] := Module[{a, i}, a[0] = 1; If[k == 1, PrimePi[n], Sum[PrimePi[n/Times @@ Prime[Array[a, k - 1]]] - a[k - 1] + 1, Evaluate[ Sequence @@ Table[{a[i], a[i - 1], PrimePi[(n/Times @@ Prime[Array[a, i - 1]])^(1/(k - i + 1))]}, {i, k - 1}]]]]]; (* Eric W. Weisstein, Feb 07 2006 *)
AlmostPrime[k_, n_] := Block[{e = Floor[Log[2, n]+k], a, b}, a = 2^e; Do[b = 2^p; While[ AlmostPrimePi[k, a] < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; AlmostPrime[1, 1] = 2;
t = Table[ AlmostPrime[n, n], {n, 20}]; Floor[Rest@ FoldList[Times, 1, t]/Rest@ FoldList[Times, 1, Prime@ Range@ 20]] (* Robert G. Wilson v, Aug 31 2007 *)
CROSSREFS
KEYWORD
easy,nonn,less
AUTHOR
Jonathan Vos Post, Oct 24 2006
EXTENSIONS
More terms from Robert G. Wilson v, Aug 31 2007
STATUS
approved