login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A129226 Residues of the Lucas - Lehmer primality test for M(31) = 2147483647. 8
4, 14, 194, 37634, 1416317954, 669670838, 1937259419, 425413602, 842014276, 12692426, 2044502122, 1119438707, 1190075270, 1450757861, 877666528, 630853853, 940321271, 512995887, 692931217, 1883625615, 1992425718 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Since a(29) = 0, M(31) = 2147483647 is prime. Mersenne numbers are only prime if a(p-2) = 0.
LINKS
Eric Weisstein's World of Mathematics, Lucas Lehmer Test.
FORMULA
a(0) = 4, a(n) = a(n-1)^2 mod 2^p-1. Last term: a(p-2).
EXAMPLE
a(29) = 65536^2 - 2 mod 2147483647 = 0.
PROG
(Python)
p = 31; Mp = 2**p - 1
from itertools import accumulate
def f(anm1, _): return (anm1**2 - 2) % Mp
print(list(accumulate([4]*30, f))) # Michael S. Branicky, Apr 14 2021
CROSSREFS
Sequence in context: A129223 A129224 A129225 * A003010 A118770 A226943
KEYWORD
fini,nonn
AUTHOR
Sergio Pimentel, Apr 04 2007
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 07:57 EDT 2024. Contains 371905 sequences. (Running on oeis4.)