[math-fun] about bugs in mathematica and pari-gp
Hello, here is a strange bug, type Prime[8200000000] or Prime[93000000000] in mathematica and your machine will hang forever.... and by a bizarre coincidence, the same thing happens with pari-gp with the value prime(8200000000), I could not test 93 000 000 000 because it is out of reach for pari-gp (I think). Does anybody has any idea why the programs are bugging on these particular values ? Best regards and have a nice day. Simon Plouffe
I get the same problem in Mathematica (wolfram11.3.0 command line). Interestingly, there must be some memoization happening, because it doesn't hang if you previously compute Prime[8199999999]: $ wolfram11.3.0 Mathematica 11.3.0 Kernel for Linux x86 (64-bit) Copyright 1988-2018 Wolfram Research, Inc. In[1]:= AbsoluteTiming[{Prime[8199999999], Prime[8200000000]}] Out[1]= {0.468778, {205021987297, 205021987301}} Did you try adjacent values in pari-gp? Best wishes, Adam P. Goucher
Sent: Sunday, May 26, 2019 at 8:00 AM From: "Simon Plouffe" <simon.plouffe@gmail.com> To: math-fun <math-fun@mailman.xmission.com> Subject: [math-fun] about bugs in mathematica and pari-gp
Hello,
here is a strange bug,
type Prime[8200000000] or Prime[93000000000] in mathematica and your machine will hang forever....
and by a bizarre coincidence, the same thing happens with pari-gp with the value prime(8200000000), I could not test 93 000 000 000 because it is out of reach for pari-gp (I think).
Does anybody has any idea why the programs are bugging on these particular values ?
Best regards and have a nice day. Simon Plouffe _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
Hello, yes, apparently it does depend on previous values, I began to search for all values starting at 2, well, a bit long to do that. correction about pari-gp, after 1 billion it starts to slow down a lot, my first diagnostic was wrong, it cannot do beyond a few billions. and, ... about Maple, as usual Maple is way too slow even before 1 billion. The largest number I could test is Prime[1 000 000 000 ] in mma. If you need more values, you need to refer to sequence : A006988 and that's about it. Simon Plouffe Le dim. 26 mai 2019 à 10:36, Adam P. Goucher <apgoucher@gmx.com> a écrit :
I get the same problem in Mathematica (wolfram11.3.0 command line). Interestingly, there must be some memoization happening, because it doesn't hang if you previously compute Prime[8199999999]:
$ wolfram11.3.0 Mathematica 11.3.0 Kernel for Linux x86 (64-bit) Copyright 1988-2018 Wolfram Research, Inc.
In[1]:= AbsoluteTiming[{Prime[8199999999], Prime[8200000000]}]
Out[1]= {0.468778, {205021987297, 205021987301}}
Did you try adjacent values in pari-gp?
Best wishes,
Adam P. Goucher
Sent: Sunday, May 26, 2019 at 8:00 AM From: "Simon Plouffe" <simon.plouffe@gmail.com> To: math-fun <math-fun@mailman.xmission.com> Subject: [math-fun] about bugs in mathematica and pari-gp
Hello,
here is a strange bug,
type Prime[8200000000] or Prime[93000000000] in mathematica and your machine will hang forever....
and by a bizarre coincidence, the same thing happens with pari-gp with the value prime(8200000000), I could not test 93 000 000 000 because it is out of reach for pari-gp (I think).
Does anybody has any idea why the programs are bugging on these particular values ?
Best regards and have a nice day. Simon Plouffe _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
SP: "The largest number I could test is Prime[1 000 000 000 ] in mma. If you need more values, you need to refer to sequence : A006988 and that's about it." One of the links in A006988 is Andrew Booker's Nth Prime Page which will go up to 10^12.
After all these years I don’t understand why Mathematica and pari aren’t using my (and Oflyzko, Lagarias ...) combinatorial algorithm for this. We did this on 1983! Victor On Sun, May 26, 2019 at 06:57 Hans Havermann <gladhobo@bell.net> wrote:
SP: "The largest number I could test is Prime[1 000 000 000 ] in mma. If you need more values, you need to refer to sequence : A006988 and that's about it."
One of the links in A006988 is Andrew Booker's Nth Prime Page which will go up to 10^12. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
Kim Walisch seems to have the latest and greatest implementation of these ideas, even using parallelism: https://github.com/kimwalisch/primecount On Sun, May 26, 2019 at 9:48 AM Victor Miller <victorsmiller@gmail.com> wrote:
After all these years I don’t understand why Mathematica and pari aren’t using my (and Oflyzko, Lagarias ...) combinatorial algorithm for this. We did this on 1983!
Victor
On Sun, May 26, 2019 at 06:57 Hans Havermann <gladhobo@bell.net> wrote:
SP: "The largest number I could test is Prime[1 000 000 000 ] in mma. If you need more values, you need to refer to sequence : A006988 and that's about it."
One of the links in A006988 is Andrew Booker's Nth Prime Page which will go up to 10^12. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
For example it can calculate prime(10^14) on my iMac: time ./primecount -n 100000000000000 3475385758524527 real 0m8.239s user 0m8.187s sys 0m0.024s For prime(10^15) it takes a little longer: time ./primecount -n 1000000000000000 37124508045065437 real 0m35.892s user 0m35.707s sys 0m0.072s On Sun, May 26, 2019 at 10:04 AM Victor Miller <victorsmiller@gmail.com> wrote:
Kim Walisch seems to have the latest and greatest implementation of these ideas, even using parallelism: https://github.com/kimwalisch/primecount
On Sun, May 26, 2019 at 9:48 AM Victor Miller <victorsmiller@gmail.com> wrote:
After all these years I don’t understand why Mathematica and pari aren’t using my (and Oflyzko, Lagarias ...) combinatorial algorithm for this. We did this on 1983!
Victor
On Sun, May 26, 2019 at 06:57 Hans Havermann <gladhobo@bell.net> wrote:
SP: "The largest number I could test is Prime[1 000 000 000 ] in mma. If you need more values, you need to refer to sequence : A006988 and that's about it."
One of the links in A006988 is Andrew Booker's Nth Prime Page which will go up to 10^12. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
That primecount code by Kim Walisch is nice. pi(10^23) in only 6 hours. Deserves a star. -tom On Sun, May 26, 2019 at 7:04 AM Victor Miller <victorsmiller@gmail.com> wrote:
Kim Walisch seems to have the latest and greatest implementation of these ideas, even using parallelism: https://github.com/kimwalisch/primecount
On Sun, May 26, 2019 at 9:48 AM Victor Miller <victorsmiller@gmail.com> wrote:
After all these years I don’t understand why Mathematica and pari aren’t using my (and Oflyzko, Lagarias ...) combinatorial algorithm for this. We did this on 1983!
Victor
On Sun, May 26, 2019 at 06:57 Hans Havermann <gladhobo@bell.net> wrote:
SP: "The largest number I could test is Prime[1 000 000 000 ] in mma. If you need more values, you need to refer to sequence : A006988 and that's about it."
One of the links in A006988 is Andrew Booker's Nth Prime Page which will go up to 10^12. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- -- http://cube20.org/ -- http://golly.sf.net/ --
That's impressive. The first time Gourdon tried to compute pi(10^23) it took 6 days. If you're interested in the analytic method, here are slides of Davd Platt: https://people.maths.bris.ac.uk/~madjp/junior%20talk.pdf On Mon, May 27, 2019 at 12:09 PM Tomas Rokicki <rokicki@gmail.com> wrote:
That primecount code by Kim Walisch is nice. pi(10^23) in only 6 hours. Deserves a star.
-tom
On Sun, May 26, 2019 at 7:04 AM Victor Miller <victorsmiller@gmail.com> wrote:
Kim Walisch seems to have the latest and greatest implementation of these ideas, even using parallelism: https://github.com/kimwalisch/primecount
On Sun, May 26, 2019 at 9:48 AM Victor Miller <victorsmiller@gmail.com> wrote:
After all these years I don’t understand why Mathematica and pari aren’t using my (and Oflyzko, Lagarias ...) combinatorial algorithm for this. We did this on 1983!
Victor
On Sun, May 26, 2019 at 06:57 Hans Havermann <gladhobo@bell.net> wrote:
SP: "The largest number I could test is Prime[1 000 000 000 ] in mma. If you need more values, you need to refer to sequence : A006988 and that's about it."
One of the links in A006988 is Andrew Booker's Nth Prime Page which will go up to 10^12. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
-- -- http://cube20.org/ -- http://golly.sf.net/ -- _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (5)
-
Adam P. Goucher -
Hans Havermann -
Simon Plouffe -
Tomas Rokicki -
Victor Miller