MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

PrimeQ queries

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24213] PrimeQ queries
  • From: "Greg Keogh" <greg at mira.net>
  • Date: Sat, 1 Jul 2000 03:21:45 -0400 (EDT)
  • Organization: Pacific Internet (Australia)
  • Sender: owner-wri-mathgroup at wolfram.com

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?

Some related questions:

* What algorithm does Mathematica 2.2 use in PrimeQ? Has it been changed in
later releases?

* Can someone point me to sample code to implement the Miller-Rabin
primality test with selectable numbers of witnesses?

Cheers,
Greg Keogh <greg at mira.net>




  • Prev by Date: How to add colors to an illuminated surface?
  • Next by Date: Re: mathlink problems
  • Previous by thread: How to add colors to an illuminated surface?
  • Next by thread: Re: PrimeQ queries