A117526 Least number a(n) which is a product of n primes and such that Pi_n(a(n))/a(n) is maximum.
3, 10, 9837, 259441550133
Offset: 1
Keywords
Examples
a(1)=3 because Pi(2)/2=1/2 < Pi(3)/3=2/3 > Pi(5)/5=3/5. a(2)=10 because Pi_2(9)/9=1/3 < Pi_2(10)/10=2/5 > Pi_2(14)/14=5/14; Pi_2(10)/10 = Pi_2(15)/15 but 10 < 15.
Links
- Eric Weisstein's World of Mathematics, Almost Prime.
- Eric Weisstein's World of Mathematics, Prime Factor.
Programs
-
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 *) fQ[n_] := Plus @@ Last /@ FactorInteger@n == 4; c = r = 0; Do[If[fQ@n, c++ ]; If[c/n > r, Print[n]; r = c/n], {n, 10^6}]
Extensions
Comment edited and a(4) added by Donovan Johnson, Mar 10 2010
Comments