login
A122942
Partial product of n-th n-almost prime (A101695) divided by product of the first n primes, rounded down.
1
1, 2, 7, 41, 403, 6960, 196527, 13405218, 1566662070, 304256578608, 113065670502087, 78229220671714544, 101598769325059903837, 293965406612712860369329, 1613982664799943153033715558
OFFSET
1,2
FORMULA
a(n) = floor( Product_{i=1..n} A101695(i) / A000040(i) ).
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
Sequence in context: A008934 A084871 A340645 * A159315 A191601 A265772
KEYWORD
easy,nonn,less
AUTHOR
Jonathan Vos Post, Oct 24 2006
EXTENSIONS
More terms from Robert G. Wilson v, Aug 31 2007
STATUS
approved