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.

A331038 Residues of the Lucas-Lehmer primality test for M(127) = 2^127 - 1.

This page as a plain text file.
%I A331038 #29 Mar 28 2025 17:35:30
%S A331038 3,7,47,2207,4870847,23725150497407,562882766124611619513723647,
%T A331038 9932388036497706472820043948129789713,
%U A331038 102423269049837077051675109560558766898,7949236499829405891753012242872011683,119093374737774941856311333667076322210
%N A331038 Residues of the Lucas-Lehmer primality test for M(127) = 2^127 - 1.
%C A331038 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.
%H A331038 Sergio Pimentel, <a href="/A331038/b331038.txt">Table of n,a(n) for n = 0..125</a>
%H A331038 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Lucas-LehmerTest.html">Lucas Lehmer Test</a>.
%H A331038 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lucas-Lehmer_primality_test">Lucas Lehmer Primality Test</a>.
%F A331038 a(n) = (a(n-1)^2 - 2) mod (2^127-1) with a(0) = 3; a(125) is the final term.
%t A331038 NestList[Mod[#^2-2,2^127-1]&, 3,10] (* _Stefano Spezia_, Mar 28 2025 *)
%Y A331038 Cf. A000043, A000668, A001566, A095847.
%Y A331038 Cf. also A129219, A129220, A129221, A129222, A129223, A129224, A129225.
%K A331038 nonn,full,fini
%O A331038 0,1
%A A331038 _Sergio Pimentel_, Jan 08 2020