rec.puzzles Archive

The 1st prime is 2, the 10th prime is 29, the 100th prime is 541, the 1000th prime is 7919, the 10000th...

arithmetic/nth.prime New

New entry, edited from material collected for the archive and not yet in a released version.

Problem

The 1st prime is 2, the 10th prime is 29, the 100th prime is 541, the
1000th prime is 7919, the 10000th prime is 104729, the 100000th prime is
1299709, and the 1000000th prime is 15485863.  How far can this be
extended by computation?

-- Phil Gibbs <gibbs@eurocontrol.fr>
Show solution
Phil, How far would you like?

the 10000000th prime is 179424671
the 100000000th prime is 2038074743
the 1000000000th prime is 22801763489
the 10000000000th prime is 252097800611
the 100000000000th prime is 2760727302517

[ See Lagarias, Miller and Odlyzko, "Computing pi(x): the
Meissel-Lehmer method" [Editor: "Calculating pi(x)" in the original]
in Math. Comp. 1985. ]

-- Victor S. Miller <victor@harder.ida.org>, April 1994

[ Editor: two of these values are off.  Counting primes with a sieve
gives pi(179424671) = 9999999 and pi(179424673) = 10000000, so the
10000000th prime is 179424673; and pi(252097800611) = 9999999999,
pi(252097800623) = 10000000000, so the 10000000000th prime is
252097800623.  The other values check. ]