cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A129226 Residues of the Lucas - Lehmer primality test for M(31) = 2147483647.

This page as a plain text file.
%I A129226 #17 Feb 16 2025 08:33:05
%S A129226 4,14,194,37634,1416317954,669670838,1937259419,425413602,842014276,
%T A129226 12692426,2044502122,1119438707,1190075270,1450757861,877666528,
%U A129226 630853853,940321271,512995887,692931217,1883625615,1992425718
%N A129226 Residues of the Lucas - Lehmer primality test for M(31) = 2147483647.
%C A129226 Since a(29) = 0, M(31) = 2147483647 is prime. Mersenne numbers are only prime if a(p-2) = 0.
%H A129226 Dennis Martin, <a href="/A129226/b129226.txt">Table of n, a(n) for n = 0..29</a>
%H A129226 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Lucas-LehmerTest.html">Lucas Lehmer Test</a>.
%H A129226 Wikipedia, <a href="http://en.wikipedia.org/wiki/Lucas-Lehmer_primality_test">Lucas Lehmer Primality Test</a>.
%F A129226 a(0) = 4, a(n) = a(n-1)^2 mod 2^p-1. Last term: a(p-2).
%e A129226 a(29) = 65536^2 - 2 mod 2147483647 = 0.
%o A129226 (Python)
%o A129226 p = 31; Mp = 2**p - 1
%o A129226 from itertools import accumulate
%o A129226 def f(anm1, _): return (anm1**2 - 2) % Mp
%o A129226 print(list(accumulate([4]*30, f))) # _Michael S. Branicky_, Apr 14 2021
%Y A129226 Cf. A095847, A003010, A129219, A129220, A129221, A129222, A129223, A129224, A129225, A001348.
%K A129226 fini,nonn
%O A129226 0,1
%A A129226 _Sergio Pimentel_, Apr 04 2007