- Lucas-Lehmer-Riesel test
The Lucas-Lehmer-Riesel test is a
primality test for numbers of the form , with . The test was developed byHans Riesel and it is based on theLucas–Lehmer test for Mersenne numbers .The algorithm
The algorithm is very similar to the Lucas-Lehmer test, but with a variable starting point depending on the value of "k".
Define a sequence {"u""i"} for all "i" > 0 by:
Then N is prime if and only if it divides .
Finding the starting value
*If "k" is equal to 1, and "n" is odd, then we are dealing with Mersenne numbers, and can take .
*If , then we can take .
*If , and n = 0 or 3 mod 4 then .
*If k = 1 or 5 mod 6 and 3 does not divide N, then we take .
*Otherwise, we are in the case where k is a multiple of 3, and it is more difficult to select the right value ofHow does the test work?
The Lucas-Lehmer-Riesel test is a particular case of group-order primality testing; we demonstrate that some number is prime by showing that some group has the order that it would have were that number prime, and we do this by finding an element of that group of precisely the right order.
For Lucas-style tests on a number N, we work in the multiplicative group of a quadratic extension of the integers modulo N; if N is prime, the order of this multiplicative group is N^2-1, it has a subgroup of order N+1, and we try to find a generator for that subgroup.
We start off by trying to find a non-iterative expression for the . Following the model of the Lucas-Lehmer test, put , and by induction we have .
So we can consider ourselves as looking at the 2"i"th term of the sequence . If satisfies a quadratic equation, this is a Lucas sequence, and has an expression of the form . Really, we're looking at the th term of a different sequence, but since decimations (take every th term starting with the zeroth) of a Lucas sequence are themselves Lucas sequences, we can deal with the factor by picking a different starting point.
LLR software
LLR is a program that can run the LLR-tests. The program was developed by
Jean Penné .Vincent Penné has modified the program so that it can obtain tests via the Internet. The software is also used by thedistributed computing projectRiesel Sieve .External links
* [http://pagesperso-orange.fr/jean.penne/index2.html Download Jean Penné's LLR]
References
* Hans Riesel: "Lucasian Criteria for the Primality of N = h·2n - 1". Mathematics of Computation, Vol. 23, No. 108 (Oct. 1969), pp. 869-875, doi:10.2307/2004975
Wikimedia Foundation. 2010.