OFFSET
0,1
COMMENTS
Since a(125) = 0, 2^127 - 1 = 170141183460469231731687303715884105727 is prime. This calculation was carried out by hand by Edouard Lucas. It took him 19 years from 1857 to 1876. The method works with a(0) = 3 since M(127) == 3 (mod 4). It also works with a(0) = 4 or a(0) = 10.
LINKS
Sergio Pimentel, Table of n,a(n) for n = 0..125
Eric Weisstein's World of Mathematics, Lucas Lehmer Test.
Wikipedia, Lucas Lehmer Primality Test.
FORMULA
a(n) = (a(n-1)^2 - 2) mod (2^127-1) with a(0) = 3; a(125) is the final term.
CROSSREFS
KEYWORD
nonn,full,fini
AUTHOR
Sergio Pimentel, Jan 08 2020
STATUS
approved