On Tue, 06 March 2001, Jud McCranie wrote:

> At 12:35 PM 3/7/2001 +0900, S.Tomabechi wrote:

> >Do you mean Pi(N) = #{ prime numbers < N } ?

> >If it is so, there is an accurate method so called Meissel-Lehmer method.

>

> That gives an exact count, but it takes a lot of computation.

Mathematica's Implementation Notes:

<<<

Prime and PrimePi use sparse caching and sieving. For large , the Lagarias�Miller�Odlyzko algorithm for PrimePi is used, based on asymptotic estimates of the density of primes, and is inverted to give Prime.

>>>

I think that this algorithm is closer to the state of the art presently than the one you mention. However, it appears that everyone's joined the party, and the ultimate algorithm is a hotch-potch from about 7 contributors (including all of the above). We're all behind the times guys, look at this page:

http://numbers.computation.free.fr/Constants/Primes/countingPrimes.html
Jaw drops...

Phil

Mathematics should not have to involve martyrdom;

Support Eric Weisstein, see

http://mathworld.wolfram.com
Find the best deals on the web at AltaVista Shopping!

http://www.shopping.altavista.com