Loading ...
Sorry, an error occurred while loading the content.

21577[PrimeNumbers] Re: Nth Index of a Prime

Expand Messages
  • Jens Kruse Andersen
    Jul 13, 2010
    • 0 Attachment
      David Broadhurst wrote:
      > David Baugh <PbtoAu@...> wrote:
      >> pi(1357911131197531) = 40159216312772
      >> The next one is too big for my implementation
      > How did you compute pi(x) with x > 10^15, please, David?

      I don't know what David Baugh uses but there is something better.
      At http://mersenneforum.org/showthread.php?t=13210 I wrote:

      "Two years ago I searched for a good pi(x) program, found an old mention
      of Christian Bau and dug up a link to http://www.cbau.freeserve.co.uk
      The link was and still is dead but the Wayback Machine has archived
      versions up to 2005 at

      There is C++ source by Christian Bau for the Extended Meissel-Lehmer
      algorithm. It works to 2^64 and my test runs agree with published counts
      by Tomás Oliveira e Silva. I have used the program for a few projects
      such as http://primes.utm.edu/curios/includes/puzzio.php. The archive has
      Version 0.92, 25/Sep/2003. The site speaks of unfinished work in
      progress and mentions future improved versions but I have not found that."

      It takes 1 minute for the program to compute pi(1357911131197531) on
      one core of a 2.4 GHz Core 2 Duo. The value agrees with David Baugh.

      Jens Kruse Andersen
    • Show all 6 messages in this topic