Currently there may be errors shown on top of a page, because of a missing Wiki update (PHP version and extension DPL3). |
Topics | Help • Register • News • History • How to • Sequences statistics • Template prototypes |
Residue
The Lucas-Lehmer test, like division, at the end produces a remainder of sorts, it is called the residue or residual. And like division, if the remainder/residue is zero there is a special (but different) meaning. For division a zero remaindert means that the number is exactly divisible. For the L-L test a zero residue means that the number is prime.
The residue is the end result of the long calculation of the L-L test. When the numbers being tested are large:
Mathematicians are interested in these residues. It is not practical for GIMPS to have the full length residues stored and sent to PrimeNet.
Example
Here is the Lucas test for
- S0 = 4
- S1 = (4 * 4 - 2) mod 127 = 14
- S2 = (14 * 14 - 2) mod 127 = 67
- S3 = (67 * 67 - 2) mod 127 = 42
- S4 = (42 * 42 - 2) mod 127 = 111
- S5 = (111 * 111 - 2) mod 127 = 0 <- the residue for this test; 127 is prime.