Re: Prime numbers and primality tests

• To: mathgroup at smc.vnet.net
• Subject: [mg129512] Re: Prime numbers and primality tests
• From: amzoti <amzoti at gmail.com>
• Date: Sat, 19 Jan 2013 01:15:29 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-newout@smc.vnet.net
• Delivered-to: mathgroup-newsend@smc.vnet.net
• References: <kd2lt4\$co5\$1@smc.vnet.net>

```On Monday, January 14, 2013 8:28:20 PM UTC-8, john... at gmail.com wrote:
> A straightforward way to test a prime number candidate is the Miller-Rabin test (sometimes called the Rabin-Miller test).  This well known and popular test is commonly executed 50 times on a candidate prime and has a proven probability of missing a non-prime of no more than 0.25 for each execution. Note that passing 50 Miller-Rabin tests (which is a de facto standard), the probability of non-primality is 0.25^50 ~ 7.9*10^-31, I'm satisfied that the number NextPrime gives me is "prime enough".  Mathematica uses the Miller-Rabin test, although it is not clear how many iterations are used.  As I understand it, Mathematica also the Lucas pseudo prime test on the Miller-Rabin output.
>
>
>
> It is interesting to note, however, that the Lucas pseudo prime method of primality testing apparently does not have the handy "feature" of the Miller-Rabin test, namely, the provable, and bounded low probability of a wrong answer, from whence an estimate of primality for any number can be made without finding a counter example!
>
>
>
> I've read that there are have been no counter-examples (viz., no non-primes that pass the the Lucas pseudo prime test) to numbers that pass the Lucas pseudo prime test, but then again, I've never found an oyster with a pearl inside.
>
>
>
> Is the Miller-Rabin a better test that the Lucas pseudo prime test?
>
>
>
>
>
> http://reference.wolfram.com/mathematica/tutorial/IntegerAndNumberTheoreticalFunctions.html
>
>
>
> http://reference.wolfram.com/mathematica/tutorial/SomeNotesOnInternalImplementation.html
>
>
>
> http://mathworld.wolfram.com/LucasPseudoprime.html

How does your Miller-Rabin test fair against the following?

8038374574536394912570796143419421081388376882875581458374889175222974273765333652186502336163960045457915042023603208766569966760987284043965408232928738791850869166857328267761771029389697739470167082304286871099974399765441448453411558724506334092790222752962294149842306881685404326457534018329786111298960644845216191652872597534901

Using the two tests together make a better test and I wouldn't say that one is better than the other.

```

• Prev by Date: Re: Needing a Random List of Non-repeating Values whose Range and Length
• Next by Date: Re: Needing a Random List of Non-repeating Values whose Range and Length
• Previous by thread: Prime numbers and primality tests
• Next by thread: Re: Prime numbers and primality tests