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-7 of 7 results.

A000043 Mersenne exponents: primes p such that 2^p - 1 is prime. Then 2^p - 1 is called a Mersenne prime.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011, 24036583, 25964951, 30402457, 32582657, 37156667, 42643801, 43112609, 57885161, 74207281
Offset: 1

Views

Author

Keywords

Comments

Equivalently, integers k such that 2^k - 1 is prime.
It is believed (but unproved) that this sequence is infinite. The data suggest that the number of terms up to exponent N is roughly K log N for some constant K.
Length of prime repunits in base 2.
The associated perfect number N=2^(p-1)*M(p) (=A019279*A000668=A000396), has 2p (=A061645) divisors with harmonic mean p (and geometric mean sqrt(N)). - Lekraj Beedassy, Aug 21 2004
In one of his first publications Euler found the numbers up to 31 but erroneously included 41 and 47.
Equals number of bits in binary expansion of n-th Mersenne prime (A117293). - Artur Jasinski, Feb 09 2007
Number of divisors of n-th even perfect number, divided by 2. Number of divisors of n-th even perfect number that are powers of 2. Number of divisors of n-th even perfect number that are multiples of n-th Mersenne prime A000668(n). - Omar E. Pol, Feb 24 2008
Number of divisors of n-th even superperfect number A061652(n). Numbers of divisors of n-th superperfect number A019279(n), assuming there are no odd superperfect numbers. - Omar E. Pol, Mar 01 2008
Differences between exponents when the even perfect numbers are represented as differences of powers of 2, for example: The 5th even perfect number is 33550336 = 2^25 - 2^12 then a(5)=25-12=13 (see A135655, A133033, A090748). - Omar E. Pol, Mar 01 2008
Number of 1's in binary expansion of n-th even perfect number (see A135650). Number of 1's in binary expansion of divisors of n-th even perfect number that are multiples of n-th Mersenne prime A000668(n) (see A135652, A135653, A135654, A135655). - Omar E. Pol, May 04 2008
Indices of the numbers A006516 that are also even perfect numbers. - Omar E. Pol, Aug 30 2008
Indices of Mersenne numbers A000225 that are also Mersenne primes A000668. - Omar E. Pol, Aug 31 2008
The (prime) number p appears in this sequence if and only if there is no prime q<2^p-1 such that the order of 2 modulo q equals p; a special case is that if p=4k+3 is prime and also q=2p+1 is prime then the order of 2 modulo q is p so p is not a term of this sequence. - Joerg Arndt, Jan 16 2011
Primes p such that sigma(2^p) - sigma(2^p-1) = 2^p-1. - Jaroslav Krizek, Aug 02 2013
Integers k such that every degree k irreducible polynomial over GF(2) is also primitive, i.e., has order 2^k-1. Equivalently, the integers k such that A001037(k) = A011260(k). - Geoffrey Critzer, Dec 08 2019
Conjecture: for k > 1, 2^k-1 is (a Mersenne) prime or k = 2^(2^m)+1 (is a Fermat number) if and only if (k-1)^(2^k-2) == 1 (mod (2^k-1)k^2). - Thomas Ordowski, Oct 05 2023
Conjecture: for p prime, 2^p-1 is (a Mersenne) prime or p = 2^(2^m)+1 (is a Fermat number) if and only if (p-1)^(2^p-2) == 1 (mod 2^p-1). - David Barina, Nov 25 2024
Already as of Dec. 2020, all exponents up to 10^8 had been verified, implying that 74207281, 77232917 and 82589933 are indeed the next three terms. As of today, all exponents up to 130439863 have been tested at least once, see the GIMPS Milestones Report. - M. F. Hasler, Apr 11 2025
On June 23. 2025 all exponents up to 74340751 have been verified, confirming that 74207281 is the exponent of the 49th Mersenne Prime. - Rodolfo Ruiz-Huidobro, Jun 23 2025

Examples

			Corresponding to the initial terms 2, 3, 5, 7, 13, 17, 19, 31 ... we get the Mersenne primes 2^2 - 1 = 3, 2^3 - 1 = 7, 2^5 - 1 = 31, 127, 8191, 131071, 524287, 2147483647, ... (see A000668).
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 4.
  • J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, p. 79.
  • R. K. Guy, Unsolved Problems in Number Theory, Section A3.
  • F. Lemmermeyer, Reciprocity Laws From Euler to Eisenstein, Springer-Verlag, 2000, p. 57.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 19.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 47.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 132-134.
  • B. Tuckerman, The 24th Mersenne prime, Notices Amer. Math. Soc., 18 (Jun, 1971), Abstract 684-A15, p. 608.

Crossrefs

Cf. A000668 (Mersenne primes).
Cf. A028335 (integer lengths of Mersenne primes).
Cf. A000225 (Mersenne numbers).
Cf. A001348 (Mersenne numbers with n prime).

Programs

  • Mathematica
    MersennePrimeExponent[Range[48]] (* Eric W. Weisstein, Jul 17 2017; updated Oct 21 2024 *)
  • PARI
    isA000043(n) = isprime(2^n-1) \\ Michael B. Porter, Oct 28 2009
    
  • PARI
    is(n)=my(h=Mod(2,2^n-1)); for(i=1, n-2, h=2*h^2-1); h==0||n==2 \\ Lucas-Lehmer test for exponent e. - Joerg Arndt, Jan 16 2011, and Charles R Greathouse IV, Jun 05 2013
    forprime(e=2,5000,if(is(e),print1(e,", "))); /* terms < 5000 */
    
  • Python
    from sympy import isprime, prime
    for n in range(1,100):
        if isprime(2**prime(n)-1):
            print(prime(n), end=', ') # Stefano Spezia, Dec 06 2018

Formula

a(n) = log((1/2)*(1+sqrt(1+8*A000396(n))))/log(2). - Artur Jasinski, Sep 23 2008 (under the assumption there are no odd perfect numbers, Joerg Arndt, Feb 23 2014)
a(n) = A000005(A061652(n)). - Omar E. Pol, Aug 26 2009
a(n) = A000120(A000396(n)), assuming there are no odd perfect numbers. - Omar E. Pol, Oct 30 2013

Extensions

Also in the sequence: p = 74207281. - Charles R Greathouse IV, Jan 19 2016
Also in the sequence: p = 77232917. - Eric W. Weisstein, Jan 03 2018
Also in the sequence: p = 82589933. - Gord Palameta, Dec 21 2018
a(46) = 42643801 and a(47) = 43112609, whose ordinal positions in the sequence are now confirmed, communicated by Eric W. Weisstein, Apr 12 2018
a(48) = 57885161, whose ordinal position in the sequence is now confirmed, communicated by Benjamin Przybocki, Jan 05 2022
Also in the sequence: p = 136279841. - Eric W. Weisstein, Oct 21 2024
As of Jan 31 2025, 48 terms are known, and are shown in the DATA section. Four additional numbers are known to be in the sequence, namely 74207281, 77232917, 82589933, and 136279841, but they may not be the next terms. See the GIMP website for the latest information. - N. J. A. Sloane, Jan 31 2025

A057429 Numbers n such that (1+i)^n - 1 times its conjugate is prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 29, 47, 73, 79, 113, 151, 157, 163, 167, 239, 241, 283, 353, 367, 379, 457, 997, 1367, 3041, 10141, 14699, 27529, 49207, 77291, 85237, 106693, 160423, 203789, 364289, 991961, 1203793, 1667321, 3704053, 4792057, 15317227
Offset: 1

Views

Author

Robert G. Wilson v, Sep 07 2000

Keywords

Comments

Equivalently, numbers n such that (1+i)^n - 1 is a Gaussian prime.
Note that n must be a rational prime. Also note that (1+i)^n + i or (1+i)^n - i is also a Gaussian prime. - T. D. Noe, Jan 31 2005
Primes which are the norms of the Gaussian integers (1 + i)^n - 1 or (1 - i)^n - 1. - Jonathan Vos Post, Feb 05 2010
Let z = (1+i)^n - 1. The product of z and its conjugate is 1 + 2^n - cos(n*Pi/4)*2^(1+n/2). For n > 3, the primes are in A007670 or A007671 depending on whether n = {1, 7} (mod 8) or n = {3, 5} (mod 8), respectively. - T. D. Noe, Mar 07 2010
Primes p such that ((1+i)^p - 1)((1-i)^p - 1) is prime. Number 2 together with odd primes p such that the norm 2^p - (-1)^((p^2-1)/8)*2^((p+1)/2) + 1 is prime. Note that Legendre symbol (2/p) = (-1)^((p^2-1)/8) as above. - Thomas Ordowski, Feb 20 2013
The exhaustive search for all a(n)<5000000 is now complete. - Serge Batalov, Sep 06 2014
The primes generated by these series are also generalized unique primes. They can be represented as Phi(4, 2^((p+1)/2) - (2/p))/2, where (2/p) is the Legendre symbol (Cf. link to Generalized unique primes page at UTM). - Serge Batalov, Sep 08 2014

Examples

			Note that 4 is not in the sequence because (1+i)^4 - 1 = -5, which is an integer prime, but not a Gaussian prime.
		

References

  • Mike Oakes, posting to the Mersenne list, Sep 07 2000.

Crossrefs

Cf. A027206 ((1+i)^n + i is a Gaussian prime), A103329 ((1+i)^n - i is a Gaussian prime).

Programs

  • Mathematica
    Do[a = (1 + I)^n - 1; b = a * Conjugate[a]; If[PrimeQ[b], Print[n]], {n, 1, 160426}] (* Wilson *)
    Select[Range[1000], PrimeQ[((1 + I)^# - 1)Conjugate[(1 + I)^# - 1]] &] (* Alonso del Arte, May 01 2014 *)
    Select[Range[48*10^5],PrimeQ[(1+I)^#-1,GaussianIntegers->True]&] (* Harvey P. Dale, Dec 30 2018 *)
  • PARI
    N=10^7; default(primelimit,N);
    forprime(p=2,N,if(ispseudoprime(norm((1+I)^p-1)),print1(p,", ")));
    /* Joerg Arndt, Jul 06 2011 */

Extensions

364289 found by Nicholas Glover on Jun 02 2001 - Mike Oakes
Edited by Dean Hickerson, Aug 14 2002; revised by N. J. A. Sloane, Dec 28 2005
a(37)-a(38) from B. Jaworski (found in 2006 and 2011) - Serge Batalov, May 01 2014
a(39)-a(40) from Serge Batalov, Sep 06 2014
a(41) from Ryan Propper and Serge Batalov, Jun 20 2023

A125738 Primes p such that 3^p - 3^((p + 1)/2) + 1 is prime.

Original entry on oeis.org

3, 11, 193, 239, 659, 709, 1103, 2029, 9049, 10453, 255361, 534827, 2888387
Offset: 1

Views

Author

Alexander Adamchuk, Dec 02 2006

Keywords

Comments

PrimePi[ a(n) ] = {2, 5, 44, 52, 120, 127, 185, 308, 1125, 1278 ...}, the indices of the primes p.
a(14) > 4400000. - Serge Batalov, Jun 20 2023

Crossrefs

Cf. A125739 = Primes p such that 3^p + 3^((p + 1)/2) + 1 is prime.
Cf. A007670 = Numbers n such that 2^n - 2^((n + 1)/2) + 1 is prime.
Cf. A007671 = Numbers n such that 2^n + 2^((n + 1)/2) + 1 is prime.
Cf. A066408 = Numbers n such that the Eisenstein integer has prime norm.

Programs

  • Mathematica
    Do[p=Prime[n];f=3^p-3^((p+1)/2)+1;If[PrimeQ[f],Print[{n,p}]],{n,1,200}]

Extensions

More terms from A066408 by Serge Batalov, Mar 24 2014
a(13) from Ryan Propper and Serge Batalov, Jun 20 2023

A125739 Primes p such that 3^p + 3^((p + 1)/2) + 1 is prime.

Original entry on oeis.org

3, 5, 7, 17, 19, 79, 163, 317, 353, 1049, 1759, 5153, 7541, 23743, 2237561, 4043119
Offset: 1

Views

Author

Alexander Adamchuk, Dec 02 2006

Keywords

Comments

PrimePi[ a(n) ] = {2, 3, 4, 7, 8, 22, 38, 66, 71, 176, 274, 687, 956, ...}, the indices of the primes p.
a(17) > 4400000. - Serge Batalov, Jun 20 2023

Crossrefs

Cf. A125738 = Primes p such that 3^p - 3^((p + 1)/2) + 1 is prime.
Cf. A007670 = Numbers n such that 2^n - 2^((n + 1)/2) + 1 is prime.
Cf. A007671 = Numbers n such that 2^n + 2^((n + 1)/2) + 1 is prime.
Cf. A066408 = Numbers n such that the Eisenstein integer has prime norm.

Programs

  • Magma
    [p: p in PrimesUpTo(5000) | IsPrime(3^p+3^((p+1)div 2)+1)]; // Vincenzo Librandi, Oct 13 2014
  • Mathematica
    Do[p=Prime[n];f=3^p+3^((p+1)/2)+1;If[PrimeQ[f],Print[{n,p}]],{n,1,200}]
  • PARI
    lista(nn) = {forprime(p=3, nn, if (ispseudoprime(3^p + 3^((p + 1)/2) + 1), print1(p, ", ")););} \\ Michel Marcus, Oct 13 2014
    

Extensions

a(11)-a(13) from Stefan Steinerberger, Sep 08 2007
a(14) from Lelio R Paula (lelio(AT)sknet.com.br), May 07 2008
a(15) from Serge Batalov, Oct 12 2014
a(16) from Ryan Propper and Serge Batalov, Jun 20 2023

A066413 Eisenstein-Mersenne primes: primes of the form ((3 +/- sqrt(-3))/2)^p - 1.

Original entry on oeis.org

7, 271, 2269, 176419, 129159847, 1162320517, 49269609804781974450852068861184694669, 589881151426658740854227725580736348850640632297373414091790995505756623268837
Offset: 1

Views

Author

Mike Oakes, Dec 24 2001

Keywords

Comments

Analogs of Mersenne primes in Eisenstein integers.
The norm of a + b*w is (a+b*w)*(a+b*w^2) = a^2 - a*b + b^2.

Examples

			For n = 7, (1-w)^7 - 1 has norm 2269, a prime.
		

References

  • Mike Oakes, email dated Dec 24 2001 to primenumbers(AT)yahoogroups.com

Crossrefs

Cf. A066408.

Programs

  • Mathematica
    maxPi = 40; norm[p_] := 1 + 3^p - 2*3^(p/2)*Cos[p*Pi/6]; A066413 = {}; Do[ If[ PrimeQ[ np = norm[ Prime[k] ] ], AppendTo[ A066413, np] ], {k, 1, maxPi}]; A066413 (* Jean-François Alcover, Oct 16 2012 *)

Extensions

Name changed by Arkadiusz Wesolowski, Apr 27 2012

A329705 Composite numbers k such that (1 - w)^(k-1) == 1 (mod k) in the ring of Eisenstein integers (w = (-1 + sqrt(3)*i)/2).

Original entry on oeis.org

121, 703, 1729, 1891, 2821, 7381, 8401, 8911, 10585, 12403, 15457, 15841, 16531, 18721, 19345, 23521, 24661, 28009, 29341, 31621, 41041, 44287, 46657, 47197, 49141, 50881, 52633, 55969, 63139, 63973, 74593, 75361, 79003, 82513, 87913, 88573, 93961, 97567, 105163
Offset: 1

Views

Author

Amiram Eldar, Feb 28 2020

Keywords

Comments

w = exp(2*Pi*i/3) = (-1 + sqrt(3)*i)/2, where i is the imaginary unit, is a unit in the ring of Eisenstein integers (usually denoted by the Greek letter omega).
Also Euler-Jacobi pseudoprimes to base 3 that are congruent to 1 (mod 6).

Crossrefs

Intersection of A016921 and A048950.

Programs

  • Mathematica
    eisProd[z1_, z2_] := {z1[[1]]*z2[[1]] - z1[[2]]*z2[[2]], z1[[1]]*z2[[2]] + z1[[2]]*z2[[1]] - z1[[2]]*z2[[2]]}; seq = {}; z = {1, 0}; Do[z = eisProd[{1, -1}, z]; If[CompositeQ[n] && And @@ Divisible[z - {1, 0}, n], AppendTo[seq, n]], {n, 2, 10^4}]; seq

A239842 Numbers n such that the Eisenstein integer ((1-ω)^n+1)/(2-ω) has prime norm, where ω = - 1/2 + sqrt(-3)/2.

Original entry on oeis.org

5, 11, 31, 37, 47, 53, 97, 163, 167, 509, 877, 1061, 2027, 2293, 3011, 6803, 8423, 13627, 20047, 28411, 50221, 50993, 71453, 152809, 272141, 505823, 1353449
Offset: 1

Views

Author

Serge Batalov, Mar 27 2014

Keywords

Comments

These numbers are sometimes called Eisenstein-Mersenne cofactors EQ(n).
The p-th Eisenstein-Mersenne cofactor can be written as EQ(p) = (3^p + Legendre(3, p) * 3^((p + 1)/2) + 1)/7.
Following an idea of Harsh Aggarwal, some of these numbers have been discovered as by-products of the search for prime Eisenstein-Mersenne norms. The reason of that is the Aurifeuillan factorization of T(k) = 3^(3k) + 1 with k odd. These numbers can be written as T(k) = (3^k + 1)*EM(k)*EQ(k)*7, EM(k) is the norm of the Eisenstein-Mersenne (1-ω)^k-1, while EQ(k) is the norm of ((1-ω)^a[n]+1)/(2-ω).
These numbers have been proved prime only up to exponent a(19) = 20047.
Next term a(28) > 1500000.

Examples

			For n = 3: ((1-ω)^31+1)/(2-ω) is an Eisenstein prime because its norm, (3^31-3^16+1)/7 = 88239050462461, is prime.
		

Crossrefs

Cf. A125743 = Primes p such that (3^p - 3^((p+1)/2) + 1)/7 is prime.
Cf. A125744 = Primes p such that (3^p + 3^((p+1)/2) + 1)/7 is prime.
Cf. A066408 = Numbers n such that the Eisenstein integer has prime norm.
Cf. A124112 = Numbers n such that ((1+I)^n+1)/(2+I) is a Gaussian prime.

Programs

  • PARI
    forprime(n=3,2300,if(ispseudoprime((3^n+kronecker(3,n)*3^((n+1)/2)+1)/7),print1(n ", "))); /* Serge Batalov, Mar 29 2014 */
Showing 1-7 of 7 results.