Lucas-Lehmer test for Mersenne primes
In mathematics, the Lucas-Lehmer test is a primality test for Mersenne numbers. The test was originally developed by Edouard Lucas in 1878 and subsequently improved by Derrick Henry Lehmer in the 1930s.
| Table of contents |
|
2 See also 3 External links |
The Lucas-Lehmer test works as follows. Let Mp = 2p− 1 be the Mersenne number to test (then presumably p is prime, otherwise Mp is composite). Define a sequence {si} for all i ≥ 0 by
The test
The first few terms of this sequence are 4, 14, 194, 37634, ... (sequence A003010 in OEIS).
Then Mp is prime iff