Re: PrimeQ queries
- To: mathgroup at smc.vnet.net
- Subject: [mg24245] Re: [mg24213] PrimeQ queries
- From: "Harvey P. Dale" <hpd1 at is2.nyu.edu>
- Date: Mon, 3 Jul 2000 20:39:25 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Greg Keogh wrote: >Hello from Melbourne Australia, >I stumbled across some educational notebooks during the week that teach >basic number theory. One of them contained this function that surprised me: >primeQ[n_]:=PrimeQ[n] && n!=89*11551*37159 && n<10^15 >Further down I discover that the built-in PrimeQ incorrectly reports these >numbers as prime: >89*11551*37159 = 38200901201 >7309*321553*2828197 = 6646915915638769 >I didn't know that PrimeQ had "flaws" in it like this, or that it had an >upper limit of reliability around 10^15. Could someone point me to some >resources that might explain more on this matter? Greg: The two examples you give of numbers which PrimeQ incorrectly reports as prime are themselves in error. PrimeQ in Version 4.0 correctly reports both of them as not being prime. For helpful discussions of PrimeQ, see not only the Mathematica book but the Standard Add-On Packages volume in its description of NumberTheory`PrimeQ`. Best, Harvey