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

[PrimeNumbers] Re: Nth Index of a Prime

Expand Messages
  • Jens Kruse Andersen
    ... 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
    Message 1 of 6 , Jul 13, 2010
      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
      http://web.archive.org/web/*/http://www.cbau.freeserve.co.uk.

      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
    • djbroadhurst
      ... Thanks, Jens! web.archive.org/web/20040125140056/http://www.cbau.freeserve.co.uk/ ... which seems to permit personal use. David
      Message 2 of 6 , Jul 13, 2010
        --- In primenumbers@yahoogroups.com,
        "Jens Kruse Andersen" <jens.k.a@...> 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 [broken URL]

        Thanks, Jens!

        web.archive.org/web/20040125140056/http://www.cbau.freeserve.co.uk/

        seems to be an appropriate archived URL. "PrimeCount.cp" says:

        > This code is unfinished work in progress. For this reason,
        > you may download this code and use it on the computer that
        > you used for downloading, but any further distribution is
        > strictly prohibited.

        which seems to permit personal use.

        David
      • pbtoau
        Looks like Bau s code goes twice as high as Baugh s code and I don t have source code. The code the community needs is that developed by Tomás Oliveira e
        Message 3 of 6 , Jul 14, 2010
          Looks like Bau's code goes twice as high as Baugh's code and I don't have source code. The code the community needs is that developed by Tomás Oliveira e Silva. His can go to at least 10^23. I have asked, but I guess not nicely enough.

          - David

          --- In primenumbers@yahoogroups.com, "djbroadhurst" <d.broadhurst@...> wrote:
          >
          >
          >
          > --- In primenumbers@yahoogroups.com,
          > 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?
          >
          > Andrew Booker's programme hosted at
          > http://primes.utm.edu/nthprime/
          > is restricted to pi(x) with x < 3*10^13.
          >
          > For those with dollars to burn, Mma seems
          > able to compute pi(x) with x < 8*10^13:
          > http://mathworld.wolfram.com/PrimeCountingFunction.html
          >
          > It seems that you have an implementation that
          > comfortably copes with x > 10^15.
          >
          > Might you consider making your code available to
          > Chris Caldwell, for on-line use at the Prime Pages,
          > as Andrew generously did with his? If the data tables
          > are too big or the CPUtime too onerous for such on-line use,
          > might you kindly provide a source that others may compile?
          >
          > Best regards
          >
          > David Broadhurst
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.