OFFSET
1,1
COMMENTS
Let M_p = 2^p-1 (not necessarily a prime) where p is an odd prime, and define b_1 = 4; b_k = b_{k-1}^2 - 2 (mod M_p) for k >= 2.
The Lucas-Lehmer theorem says that M_p is a prime iff b_{p-1} == 0 (mod M_p).
Furthermore, if M_p is a prime, then b_{p-2} is congruent to +- 2^((p+1)/2) (mod M_p).
REFERENCES
J. B. Cosgrave, A Mersenne-Wieferich Odyssey, Manuscript, May 2022. See Section 16.1.
LINKS
CROSSREFS
KEYWORD
nonn,more
AUTHOR
N. J. A. Sloane, Jun 02 2022, based on Section 16.1 of Cosgrave (2022).
EXTENSIONS
Thanks to Chai Wah Wu for several corrections. - N. J. A. Sloane, Jun 02 2022
a(16) from Chai Wah Wu, Jun 03 2022
a(17)-a(18) from Chai Wah Wu, Jun 04 2022
a(19)-a(25) from Serge Batalov, _Jun 11 2022
STATUS
approved