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.

Previous Showing 31-40 of 125 results. Next

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).

A234972 Least prime p < prime(n) such that 2^p - 1 is a primitive root modulo prime(n), or 0 if such a prime p does not exist.

Original entry on oeis.org

0, 0, 2, 2, 3, 3, 2, 2, 3, 2, 2, 17, 3, 2, 5, 2, 5, 3, 3, 3, 5, 2, 11, 2, 3, 2, 13, 3, 7, 2, 2, 5, 2, 2, 2, 3, 11, 2, 11, 2, 3, 7, 7, 7, 2, 2, 2, 2, 5, 3, 2, 3, 3, 7, 2, 3, 2, 11, 5, 2, 2, 2, 5, 5, 5, 2, 2, 5, 3, 3, 2, 3, 7, 7, 2, 7, 2, 3, 2, 7, 5, 31, 3, 3, 5, 3, 2, 5, 2, 2, 5, 5, 2, 3, 3, 5, 2, 2, 7, 7
Offset: 1

Views

Author

Zhi-Wei Sun, Apr 20 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2.

Examples

			a(3) = 2 since 2 is a prime smaller than prime(3) = 5 with 2^2 - 1 = 3 a primitive root modulo prime(3) = 5.
		

Crossrefs

Programs

  • Mathematica
    gp[g_,p_]:=Mod[g,p]>0&&(Length[Union[Table[Mod[g^k, p],{k,1,p-1}]]]==p-1)
    Do[Do[If[gp[2^(Prime[k])-1,Prime[n]],Print[n," ",Prime[k]];Goto[aa]],{k,1,n-1}];Print[n," ",0];Label[aa];Continue,{n,1,100}]

A097743 Numbers of the form 3*2^(p - 1) - 1 where p is prime.

Original entry on oeis.org

5, 11, 47, 191, 3071, 12287, 196607, 786431, 12582911, 805306367, 3221225471, 206158430207, 3298534883327, 13194139533311, 211106232532991, 13510798882111487, 864691128455135231, 3458764513820540927
Offset: 1

Views

Author

Parthasarathy Nambi, Sep 21 2004

Keywords

Examples

			p=2, 2^(2-1) + (2^2 - 1) = 5;
p=3, 2^(3-1) + (2^3 - 1) = 11.
		

Crossrefs

Programs

  • Mathematica
    Table[3*2^(Prime[n] - 1) - 1, {n, 18}] (* Robert G. Wilson v, Sep 24 2004 *)
  • PARI
    a(n) = 3*2^(prime(n) - 1) - 1; \\ Michel Marcus, Nov 30 2017

Formula

a(n) = A001348(n) + A061286(n). - Iain Fox, Dec 08 2017

Extensions

Edited and extended by Robert G. Wilson v, Sep 24 2004

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).

A077586 a(n) = 2^(2^prime(n) - 1) - 1.

Original entry on oeis.org

7, 127, 2147483647, 170141183460469231731687303715884105727
Offset: 1

Views

Author

Henry Bottomley, Nov 07 2002

Keywords

Comments

First four terms are primes. Fifth (1.61585...*10^616), sixth (5.45374...*10^2465), seventh (2.007...*10^39456) and eighth (1.298...*10^157826) are not primes.
Note that a(n) divides 2^a(n)-2 for every n, so if a(n) is composite then a(n) is a Fermat pseudoprime to base 2; cf. A007013. - Thomas Ordowski, Apr 08 2016
A number MM(p) is prime iff M(p) = A000225(p) = 2^p-1 is a Mersenne prime exponent (A000043), which isn't possible unless p itself is also in A000043. Primes of this form are called double Mersenne primes MM(p). For all Mersenne exponents between 7 and 61, factors of MM(p) are known. The next candidate MM(61) is far too large to be merely stored on any existing hard drive (it would require 3*10^17 bytes), but a distributed search for factors of this and other MM(p) is ongoing, see the doublemersenne.org web site. - M. F. Hasler, Mar 05 2020

Examples

			a(3) = 2^(2^5 - 1) - 1 = 2^31 - 1 = 2147483647.
		

Crossrefs

Cf. A077585 (double Mersenne numbers), A000225 (Mersenne numbers), A001348 (ditto with prime indices), A000040 (primes).

Programs

Formula

a(n) = A077585(A000040(n)) = A000225(A001348(n)).
Previous Showing 31-40 of 125 results. Next