Lucas-Lehmer test

AjustarCompartirImprimirCitar
Fragment in French of the Lucas-Lehmer Test.

In mathematics, the Lucas-Lehmer test is a test used to determine whether a certain Mersenne number Mp is prime. The test was developed by Edouard Lucas in 1878 and subsequently improved by Derrick Henry Lehmer in the 1930s.

The test

The Lucas-Lehmer test consists of the following: let Mp = 2p− 1 the Mersenne number to test with p odd prime. Define the sequence {si} for all i ≥ 0 according to:

si={4,Yeah.i=0;si− − 12− − 2Otherwise.{displaystyle s_{i}=left{{begin{matrix}4,qquad , expose{mbox{si }i=0; ,\s_{i-1}^{2}-2 stranger{mbox{in case otherwise}}}}end{matrix}}right. !

The first terms of this sequence are 4, 14, 194, 37634,... (sequence A003010 in OEIS). Then, Mp is prime if and only if

sp− − 2≡ ≡ 0(modMp);{displaystyle s_{p-2}equiv 0{pmod {M_{p}}};}

Otherwise, Mp is composite. The number sp − 2 mod Mp is called the Lucas–Lehmer residue of p.

An implementation using the Schönhage–Strassen fast multiplication algorithm, itself based on the fast Fourier transform, gives the Lucas–Lehmer test a complexity of O(n2 log n log log n), where n is the length of the number.

Contenido relacionado

Binary prefix

The binary prefixes are used to create binary multiples, that is, base 2 (binary system). They are currently part of the international standard ISO/IEC...

Diego Rodriguez (mathematician)

Diego Rodríguez is one of the most important figures of the period of scientific enlightenment that took place in the Viceroyalty of New Spain in the second...

Levi-Civita symbol

In mathematics, and in particular in tensor calculus, the Levi-Civita symbol is defined, also called the permutation symbol, alternating symbol or Levi-Civita...
Más resultados...
Tamaño del texto: