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.

Showing 1-8 of 8 results.

A129225 Residues of the Lucas - Lehmer primality test for M(29) = 536870911.

Original entry on oeis.org

4, 14, 194, 37634, 342576132, 250734296, 433300702, 16341479, 49808751, 57936161, 211467447, 71320725, 91230447, 153832672, 217471443, 239636427, 223645010, 90243197, 27374393, 490737401, 35441039, 303927542, 202574536
Offset: 0

Views

Author

Sergio Pimentel, Apr 04 2007

Keywords

Comments

Since a(27) > 0, M(29) = 536870911 is composite. Mersenne numbers are only prime if a(p-2) = 0.

Examples

			a(27) = 365171774^2 - 2 mod 536870911 = 458738443.
		

Crossrefs

Programs

  • Mathematica
    NestList[Mod[#^2-2, 2^29-1] &, 4, 27] (* Ben Whitmore, Dec 28 2024 *)

Formula

a(0) = 4, a(n) = a(n-1)^2 - 2 mod 2^p-1, last term: a(p-2).

A129220 Residues of the Lucas - Lehmer primality test for M(11) = 2047.

Original entry on oeis.org

4, 14, 194, 788, 701, 119, 1877, 240, 282, 1736
Offset: 0

Views

Author

Sergio Pimentel, Apr 05 2007

Keywords

Comments

Since a(9) > 0, M(11) is composite. In fact, 2047 = 23 * 89

Examples

			a(9) = a(8)^2 - 2 mod 2047 = 282^2 - 2 mod 2047 = 1736.
		

Crossrefs

Formula

a(0) = 4; a(n) = a(n-1)^2-2 mod 2^p-1. Last term: a(p-2).

Extensions

Offset corrected by Nathaniel Johnston, May 31 2011

A129221 Residues of the Lucas - Lehmer primality test for M(13) = 8191.

Original entry on oeis.org

4, 14, 194, 4870, 3953, 5970, 1857, 36, 1294, 3470, 128, 0
Offset: 0

Views

Author

Sergio Pimentel, Apr 04 2007

Keywords

Comments

Since a(11) = 0, M(13) = 8191 is prime.

Examples

			a(11)= 128^2 - 2 mod 8191 = 16382 mod 8191 = 0
		

Crossrefs

Formula

a(0) = 4 a(n) = a(n-1)^2 mod 2^p-1 Last term: a(p-2)

A129222 Residues of the Lucas - Lehmer primality test for M(17) = 131071.

Original entry on oeis.org

4, 14, 194, 37634, 95799, 119121, 66179, 53645, 122218, 126220, 70490, 69559, 99585, 78221, 130559, 0
Offset: 0

Views

Author

Sergio Pimentel, Apr 04 2007

Keywords

Comments

Since a(15) = 0, M(17) = 131071 is prime.

Examples

			a(15) = 130559^2 - 2 mod 131071 = 0.
		

Crossrefs

Formula

a(0) = 4, a(n) = a(n-1)^2 mod 2^p-1. Last term: a(p-2).

A129223 Residues of the Lucas - Lehmer primality test for M(19) = 524287.

Original entry on oeis.org

4, 14, 194, 37634, 218767, 510066, 386344, 323156, 218526, 504140, 103469, 417706, 307417, 382989, 275842, 85226, 523263, 0
Offset: 0

Views

Author

Sergio Pimentel, Apr 04 2007

Keywords

Comments

Since a(17) = 0, M(19) = 524287 is prime.

Examples

			a(17) = 523263^2 - 2 mod 524287 = 0.
		

Crossrefs

Formula

a(0) = 4, a(n) = a(n-1)^2 mod 2^p-1. Last term: a(p-2).

A129224 Residues of the Lucas - Lehmer primality test for M(23) = 8388607.

Original entry on oeis.org

4, 14, 194, 37634, 7031978, 7033660, 1176429, 7643358, 3179743, 2694768, 763525, 4182158, 7004001, 1531454, 5888805, 1140622, 4321431, 7041324, 2756392, 1280050, 6563009, 6107895
Offset: 0

Views

Author

Sergio Pimentel, Apr 04 2007

Keywords

Comments

Since a(21) > 0, M(23) = 8388607 is composite. Mersenne numbers are only prime if a(p-2) = 0.

Examples

			a(21) = 6563009^2 - 2 mod 8388607 = 6107895.
		

Crossrefs

Formula

a(0) = 4, a(n) = a(n-1)^2 mod 2^p-1. Last term: a(p-2).

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

Original entry on oeis.org

4, 14, 194, 37634, 1416317954, 669670838, 1937259419, 425413602, 842014276, 12692426, 2044502122, 1119438707, 1190075270, 1450757861, 877666528, 630853853, 940321271, 512995887, 692931217, 1883625615, 1992425718
Offset: 0

Views

Author

Sergio Pimentel, Apr 04 2007

Keywords

Comments

Since a(29) = 0, M(31) = 2147483647 is prime. Mersenne numbers are only prime if a(p-2) = 0.

Examples

			a(29) = 65536^2 - 2 mod 2147483647 = 0.
		

Crossrefs

Programs

  • 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

Formula

a(0) = 4, a(n) = a(n-1)^2 mod 2^p-1. Last term: a(p-2).

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

Original entry on oeis.org

3, 7, 47, 2207, 4870847, 23725150497407, 562882766124611619513723647, 9932388036497706472820043948129789713, 102423269049837077051675109560558766898, 7949236499829405891753012242872011683, 119093374737774941856311333667076322210
Offset: 0

Views

Author

Sergio Pimentel, Jan 08 2020

Keywords

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.

Crossrefs

Programs

  • Mathematica
    NestList[Mod[#^2-2,2^127-1]&, 3,10] (* Stefano Spezia, Mar 28 2025 *)

Formula

a(n) = (a(n-1)^2 - 2) mod (2^127-1) with a(0) = 3; a(125) is the final term.
Showing 1-8 of 8 results.