Lucas–Lehmer–Riesel test

In mathematics, the Lucas–Lehmer–Riesel test is a primality test for numbers of the form N = k  2n  1, with 2n > k. The test was developed by Hans Riesel and it is based on the Lucas–Lehmer primality test. It is the fastest deterministic algorithm known for numbers of that form. The Brillhart–Lehmer–Selfridge test is the fastest deterministic algorithm for numbers of the form N = k  2n + 1 (Proth 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 {ui} for all i > 0 by:

u_i = u_{i-1}^2-2. \,

Then N is prime if and only if it divides un2.

Finding the starting value

How the test works

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 N2  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 u_i. Following the model of the Lucas–Lehmer test, put u_i = a^{2^i} + a^{-2^i}, and by induction we have u_i = u_{i-1}^2 - 2.

So we can consider ourselves as looking at the 2ith term of the sequence v(i) = a^i + a^{-i}. If a satisfies a quadratic equation, this is a Lucas sequence, and has an expression of the form v(i) = \alpha v(i-1) + \beta v(i-2). Really, we're looking at the k  2ith term of a different sequence, but since decimations (take every kth term starting with the zeroth) of a Lucas sequence are themselves Lucas sequences, we can deal with the factor k 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 both used by individual prime searchers and some distributed computing projects including Riesel Sieve and PrimeGrid.

See also

References

External links