OFFSET
1,1
COMMENTS
This function gives a very good approximation to the number of primes less than or equal to n.
Also note that f(2^23) - pi(2^23) = 1, f(2^31) - pi(2^31) = 25, f(2^43) - pi(2^43) = 99, f(2^58) - pi(2^58) = -53540.
LINKS
Chris K. Caldwell, How Many Primes Are There?
Eric Weisstein's World of Mathematics, Prime Counting Function
Eric Weisstein's World of Mathematics, Prime Number Theorem
MATHEMATICA
f[n_Integer] := Sum[N[MoebiusMu[k]*HarmonicNumber[k]/k^(3/2)*LogIntegral[n^(1/k)], 50], {k, 1, 5!}]; Table[Round[f[2^n]], {n, 36}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Arkadiusz Wesolowski, Dec 30 2011
STATUS
approved