Lucas-Lehmer test: Difference between revisions
Content added Content deleted
m (Trying out new task tag option) |
m (Added to Arith cat) |
||
Line 1: | Line 1: | ||
[[Category:Less Than 10 Examples]]{{task|Prime Numbers}}[[Category:Arbitrary precision]] |
[[Category:Less Than 10 Examples]]{{task|Prime Numbers}}[[Category:Arbitrary precision]][[Category:Arithmetic operations]] |
||
Lucas-Lehmer Test: for p a prime, the Mersenne number 2**p-1 is prime if |
Lucas-Lehmer Test: for p a prime, the Mersenne number 2**p-1 is prime if |
||
and only if 2**p-1 divides S(p-1) where S(n+1)=S(n)**2-2, and S(1)=4. |
and only if 2**p-1 divides S(p-1) where S(n+1)=S(n)**2-2, and S(1)=4. |