The Lucas-Lehmer test for Mersenne primes reference article from the English Wikipedia on 24-Apr-2004
(provided by Fixed Reference: snapshots of Wikipedia from wikipedia.org)

Lucas-Lehmer test for Mersenne primes

Sponsorship the way you would do it

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
1 The test
2 See also
3 External links

The test

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 first few terms of this sequence are 4, 14, 194, 37634, ... (sequence A003010 in OEIS). Then Mp is prime iff
otherwise, Mp is composite. The number sp − 2 mod Mp is called the Lucas-Lehmer residue of p.

See also

External links