Chris Jefferson <[EMAIL PROTECTED]> writes
> It is well known that n is prime if for all prime factors of n-1, a^(n-1)
> = 1 mod n and a^((n-1)/q) is not 1 mod n.
What are a and q? You want to say
`if for each prime factor q of n-1, there exists a base a such that ...' .
> For example, take a=2, and 2^p+1 (p is prime, yes, that IS a plus)
>
> Then we need to check if 2^(2^p)=1 mod (2^p -1) and 2^((2^p)/2) is not 1.
What is n here? Your modulus is 2^p - 1, suggesting you intend
n = 2^p - 1. But the exponent is 2^p, suggesting you intend n = 2^p + 1.
If we try p = 3, then 2^p - 1 = 7 is prime.
But 2^(2^p) = 2^8 = 256 is not one modulo 7.
Peter Montgomery
_________________________________________________________________
Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ -- http://www.tasam.com/~lrwiman/FAQ-mers