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-10 of 13 results. Next

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

A000396 Perfect numbers k: k is equal to the sum of the proper divisors of k.

Original entry on oeis.org

6, 28, 496, 8128, 33550336, 8589869056, 137438691328, 2305843008139952128, 2658455991569831744654692615953842176, 191561942608236107294793378084303638130997321548169216
Offset: 1

Views

Author

Keywords

Comments

A number k is abundant if sigma(k) > 2k (cf. A005101), perfect if sigma(k) = 2k (this sequence), or deficient if sigma(k) < 2k (cf. A005100), where sigma(k) is the sum of the divisors of k (A000203).
The numbers 2^(p-1)*(2^p - 1) are perfect, where p is a prime such that 2^p - 1 is also prime (for the list of p's see A000043). There are no other even perfect numbers and it is believed that there are no odd perfect numbers.
Numbers k such that Sum_{d|k} 1/d = 2. - Benoit Cloitre, Apr 07 2002
For number of divisors of a(n) see A061645(n). Number of digits in a(n) is A061193(n). - Lekraj Beedassy, Jun 04 2004
All terms other than the first have digital root 1 (since 4^2 == 4 (mod 6), we have, by induction, 4^k == 4 (mod 6), or 2*2^(2*k) = 8 == 2 (mod 6), implying that Mersenne primes M = 2^p - 1, for odd p, are of the form 6*t+1). Thus perfect numbers N, being M-th triangular, have the form (6*t+1)*(3*t+1), whence the property N mod 9 = 1 for all N after the first. - Lekraj Beedassy, Aug 21 2004
The earliest recorded mention of this sequence is in Euclid's Elements, IX 36, about 300 BC. - Artur Jasinski, Jan 25 2006
Theorem (Euclid, Euler). An even number m is a perfect number if and only if m = 2^(k-1)*(2^k-1), where 2^k-1 is prime. Euler's idea came from Euclid's Proposition 36 of Book IX (see Weil). It follows that every even perfect number is also a triangular number. - Mohammad K. Azarian, Apr 16 2008
Triangular numbers (also generalized hexagonal numbers) A000217 whose indices are Mersenne primes A000668, assuming there are no odd perfect numbers. - Omar E. Pol, May 09 2008, Sep 15 2013
If a(n) is even, then 2*a(n) is in A181595. - Vladimir Shevelev, Nov 07 2010
Except for a(1) = 6, all even terms are of the form 30*k - 2 or 45*k + 1. - Arkadiusz Wesolowski, Mar 11 2012
a(4) = A229381(1) = 8128 is the "Simpsons's perfect number". - Jonathan Sondow, Jan 02 2015
Theorem (Farideh Firoozbakht): If m is an integer and both p and p^k-m-1 are prime numbers then x = p^(k-1)*(p^k-m-1) is a solution to the equation sigma(x) = (p*x+m)/(p-1). For example, if we take m=0 and p=2 we get Euclid's result about perfect numbers. - Farideh Firoozbakht, Mar 01 2015
The cototient of the even perfect numbers is a square; in particular, if 2^p - 1 is a Mersenne prime, cototient(2^(p-1) * (2^p - 1)) = (2^(p-1))^2 (see A152921). So, this sequence is a subsequence of A063752. - Bernard Schott, Jan 11 2019
Euler's (1747) proof that all the even perfect number are of the form 2^(p-1)*(2^p-1) implies that their asymptotic density is 0. Kanold (1954) proved that the asymptotic density of odd perfect numbers is 0. - Amiram Eldar, Feb 13 2021
If k is perfect and semiprime, then k = 6. - Alexandra Hercilia Pereira Silva, Aug 30 2021
This sequence lists the fixed points of A001065. - Alois P. Heinz, Mar 10 2024

Examples

			6 is perfect because 6 = 1+2+3, the sum of all divisors of 6 less than 6; 28 is perfect because 28 = 1+2+4+7+14.
		

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 4.
  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 2d ed. 1966, pp. 11-23.
  • Stanley J. Bezuszka, Perfect Numbers (Booklet 3, Motivated Math. Project Activities), Boston College Press, Chestnut Hill MA, 1980.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 136-137.
  • Euclid, Elements, Book IX, Section 36, about 300 BC.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.3 Perfect and Amicable Numbers, pp. 82-83.
  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section B1.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 239.
  • T. Koshy, "The Ends Of A Mersenne Prime And An Even Perfect Number", Journal of Recreational Mathematics, Baywood, NY, 1998, pp. 196-202.
  • Joseph S. Madachy, Madachy's Mathematical Recreations, New York: Dover Publications, Inc., 1979, p. 149 (First publ. by Charles Scribner's Sons, New York, 1966, under the title: Mathematics on Vacation).
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, pages 46-48, 244-245.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 83-87.
  • József Sándor and Borislav Crstici, Handbook of Number Theory, II, Springer Verlag, 2004.
  • 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).
  • Ian Stewart, L'univers des nombres, "Diviser Pour Régner", Chapter 14, pp. 74-81, Belin-Pour La Science, Paris, 2000.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, chapter 4, pages 127-149.
  • Horace S. Uhler, On the 16th and 17th perfect numbers, Scripta Math., Vol. 19 (1953), pp. 128-131.
  • André Weil, Number Theory, An approach through history, From Hammurapi to Legendre, Birkhäuser, 1984, p. 6.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, pp. 107-110, Penguin Books, 1987.

Crossrefs

See A000043 for the current state of knowledge about Mersenne primes.
Cf. A228058 for Euler's criterion for odd terms.
Positions of 0's in A033879 and in A033880.
Cf. A001065.

Programs

  • Haskell
    a000396 n = a000396_list !! (n-1)
    a000396_list = [x | x <- [1..], a000203 x == 2 * x]
    -- Reinhard Zumkeller, Jan 20 2012
    
  • Mathematica
    Select[Range[9000], DivisorSigma[1,#]== 2*# &] (* G. C. Greubel, Oct 03 2017 *)
    PerfectNumber[Range[15]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 10 2018 *)
  • PARI
    isA000396(n) = (sigma(n) == 2*n);
    
  • Python
    from sympy import divisor_sigma
    def ok(n): return n > 0 and divisor_sigma(n) == 2*n
    print([k for k in range(9999) if ok(k)]) # Michael S. Branicky, Mar 12 2022

Formula

The perfect number N = 2^(p-1)*(2^p - 1) is also multiplicatively p-perfect (i.e., A007955(N) = N^p), since tau(N) = 2*p. - Lekraj Beedassy, Sep 21 2004
a(n) = 2^A133033(n) - 2^A090748(n), assuming there are no odd perfect numbers. - Omar E. Pol, Feb 28 2008
a(n) = A000668(n)*(A000668(n)+1)/2, assuming there are no odd perfect numbers. - Omar E. Pol, Apr 23 2008
a(n) = A000217(A000668(n)), assuming there are no odd perfect numbers. - Omar E. Pol, May 09 2008
a(n) = Sum of the first A000668(n) positive integers, assuming there are no odd perfect numbers. - Omar E. Pol, May 09 2008
a(n) = A000384(A019279(n)), assuming there are no odd perfect numbers and no odd superperfect numbers. a(n) = A000384(A061652(n)), assuming there are no odd perfect numbers. - Omar E. Pol, Aug 17 2008
a(n) = A006516(A000043(n)), assuming there are no odd perfect numbers. - Omar E. Pol, Aug 30 2008
From Reikku Kulon, Oct 14 2008: (Start)
A144912(2, a(n)) = 1;
A144912(4, a(n)) = -1 for n > 1;
A144912(8, a(n)) = 5 or -5 for all n except 2;
A144912(16, a(n)) = -4 or -13 for n > 1. (End)
a(n) = A019279(n)*A000668(n), assuming there are no odd perfect numbers and odd superperfect numbers. a(n) = A061652(n)*A000668(n), assuming there are no odd perfect numbers. - Omar E. Pol, Jan 09 2009
a(n) = A007691(A153800(n)), assuming there are no odd perfect numbers. - Omar E. Pol, Jan 14 2009
Even perfect numbers N = K*A000203(K), where K = A019279(n) = 2^(p-1), A000203(A019279(n)) = A000668(n) = 2^p - 1 = M(p), p = A000043(n). - Lekraj Beedassy, May 02 2009
a(n) = A060286(A016027(n)), assuming there are no odd perfect numbers. - Omar E. Pol, Dec 13 2012
For n >= 2, a(n) = Sum_{k=1..A065549(n)} (2*k-1)^3, assuming there are no odd perfect numbers. - Derek Orr, Sep 28 2013
a(n) = A275496(2^((A000043(n) - 1)/2)) - 2^A000043(n), assuming there are no odd perfect numbers. - Daniel Poveda Parrilla, Aug 16 2016
a(n) = A156552(A324201(n)), assuming there are no odd perfect numbers. - Antti Karttunen, Mar 28 2019
a(n) = ((2^(A000043(n)))^3 - (2^(A000043(n)) - 1)^3 - 1)/6, assuming there are no odd perfect numbers. - Jules Beauchamp, Jun 06 2025

Extensions

I removed a large number of comments that assumed there are no odd perfect numbers. There were so many it was getting hard to tell which comments were true and which were conjectures. - N. J. A. Sloane, Apr 16 2023
Reference to Albert H. Beiler's book updated by Harvey P. Dale, Jan 13 2025

A000668 Mersenne primes (primes of the form 2^n - 1).

Original entry on oeis.org

3, 7, 31, 127, 8191, 131071, 524287, 2147483647, 2305843009213693951, 618970019642690137449562111, 162259276829213363391578010288127, 170141183460469231731687303715884105727
Offset: 1

Views

Author

Keywords

Comments

For a Mersenne number 2^n - 1 to be prime, the exponent n must itself be prime.
See A000043 for the values of n.
Primes that are repunits in base 2.
Define f(k) = 2k+1; begin with k = 2, a(n+1) = least prime of the form f(f(f(...(a(n))))). - Amarnath Murthy, Dec 26 2003
Mersenne primes other than the first are of the form 6n+1. - Lekraj Beedassy, Aug 27 2004. Mersenne primes other than the first are of the form 24n+7; see also A124477. - Artur Jasinski, Nov 25 2007
A034876(a(n)) = 0 and A034876(a(n)+1) = 1. - Jonathan Sondow, Dec 19 2004
Mersenne primes are solutions to sigma(n+1)-sigma(n) = n as perfect numbers (A000396(n)) are solutions to sigma(n) = 2n. In fact, appears to give all n such that sigma(n+1)-sigma(n) = n. - Benoit Cloitre, Aug 27 2002
If n is in the sequence then sigma(sigma(n)) = 2n+1. Is it true that this sequence gives all numbers n such that sigma(sigma(n)) = 2n+1? - Farideh Firoozbakht, Aug 19 2005
It is easily proved that if n is a Mersenne prime then sigma(sigma(n)) - sigma(n) = n. Is it true that Mersenne primes are all the solutions of the equation sigma(sigma(x)) - sigma(x) = x? - Farideh Firoozbakht, Feb 12 2008
Sum of divisors of n-th even superperfect number A061652(n). Sum of divisors of n-th superperfect number A019279(n), if there are no odd superperfect numbers. - Omar E. Pol, Mar 11 2008
Indices of both triangular numbers and generalized hexagonal numbers (A000217) that are also even perfect numbers. - Omar E. Pol, May 10 2008, Sep 22 2013
Number of positive integers (1, 2, 3, ...) whose sum is the n-th perfect number A000396(n). - Omar E. Pol, May 10 2008
Vertex number where the n-th perfect number A000396(n) is located in the square spiral whose vertices are the positive triangular numbers A000217. - Omar E. Pol, May 10 2008
Mersenne numbers A000225 whose indices are the prime numbers A000043. - Omar E. Pol, Aug 31 2008
The digital roots are 1 if p == 1 (mod 6) and 4 if p == 5 (mod 6). [T. Koshy, Math Gaz. 89 (2005) p. 465]
Primes p such that for all primes q < p, p XOR q = p - q. - Brad Clardy, Oct 26 2011
All these primes, except 3, are Brazilian primes, so they are also in A085104 and A023195. - Bernard Schott, Dec 26 2012
All prime numbers p can be classified by k = (p mod 12) into four classes: k=1, 5, 7, 11. The Mersennne prime numbers 2^p-1, p > 2 are in the class k=7 with p=12*(n-1)+7, n=1,2,.... As all 2^p (p odd) are in class k=8 it follows that all 2^p-1, p > 2 are in class k=7. - Freimut Marschner, Jul 27 2013
From "The Guinness Book of Primes": "During the reign of Queen Elizabeth I, the largest known prime number was the number of grains of rice on the chessboard up to and including the nineteenth square: 524,287 [= 2^19 - 1]. By the time Lord Nelson was fighting the Battle of Trafalgar, the record for the largest prime had gone up to the thirty-first square of the chessboard: 2,147,483,647 [= 2^31 - 1]. This ten-digits number was proved to be prime in 1772 by the Swiss mathematician Leonard Euler, and it held the record until 1867." [du Sautoy] - Robert G. Wilson v, Nov 26 2013
If n is in the sequence then A024816(n) = antisigma(n) = antisigma(n+1) - 1. Is it true that this sequence gives all numbers n such that antisigma(n) = antisigma(n+1) - 1? Are there composite numbers with this property? - Jaroslav Krizek, Jan 24 2014
If n is in the sequence then phi(n) + sigma(sigma(n)) = 3n. Is it true that Mersenne primes are all the solutions of the equation phi(x) + sigma(sigma(x)) = 3x? - Farideh Firoozbakht, Sep 03 2014
a(5) = A229381(2) = 8191 is the "Simpsons' Mersenne prime". - Jonathan Sondow, Jan 02 2015
Equivalently, prime powers of the form 2^n - 1, see Theorem 2 in Lemos & Cambraia Junior. - Charles R Greathouse IV, Jul 07 2016
Primes whose sum of divisors is a power of 2. Primes p such that p + 1 is a power of 2. Primes in A046528. - Omar E. Pol, Jul 09 2016
From Jaroslav Krizek, Jan 19 2017: (Start)
Primes p such that sigma(p+1) = 2p+1.
Primes p such that A051027(p) = sigma(sigma(p)) = 2^k-1 for some k > 1.
Primes p of the form sigma(2^prime(n)-1)-1 for some n. Corresponding values of numbers n are in A016027.
Primes p of the form sigma(2^(n-1)) for some n > 1. Corresponding values of numbers n are in A000043 (Mersenne exponents).
Primes of the form sigma(2^(n+1)) for some n > 1. Corresponding values of numbers n are in A153798 (Mersenne exponents-2).
Primes p of the form sigma(n) where n is even; subsequence of A023195. Primes p of the form sigma(n) for some n. Conjecture: 31 is the only prime p such that p = sigma(x) = sigma(y) for distinct numbers x and y; 31 = sigma(16) = sigma(25).
Conjecture: numbers n such that n = sigma(sigma(n+1)-n-1)-1, i.e., A072868(n)-1.
Conjecture: primes of the form sigma(4*(n-1)) for some n. Corresponding values of numbers n are in A281312. (End)
[Conjecture] For n > 2, the Mersenne number M(n) = 2^n - 1 is a prime if and only if 3^M(n-1) == -1 (mod M(n)). - Thomas Ordowski, Aug 12 2018 [This needs proof! - Joerg Arndt, Mar 31 2019]
Named "Mersenne's numbers" by W. W. Rouse Ball (1892, 1912) after Marin Mersenne (1588-1648). - Amiram Eldar, Feb 20 2021
Theorem. Let b = 2^p - 1 (where p is a prime). Then b is a Mersenne prime iff (c = 2^p - 2 is totient or a term of A002202). Otherwise, if c is (nontotient or a term of A005277) then b is composite. Proof. Trivial, since, while b = v^g - 1 where v is even, v > 2, g is an integer, g > 1, b is always composite, and c = v^g - 2 is nontotient (or a term of A005277), and so is for any composite b = 2^g - 1 (in the last case, c = v^g - 2 is also nontotient, or a term of A005277). - Sergey Pavlov, Aug 30 2021 [Disclaimer: This proof has not been checked. - N. J. A. Sloane, Oct 01 2021]

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 4.
  • John Brillhart, D. H. Lehmer, J. L. Selfridge, Bryant Tuckerman and S. S. Wagstaff, Jr., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 135-136.
  • Graham Everest, Alf van der Poorten, Igor Shparlinski and Thomas Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 76.
  • Marcus P. F. du Sautoy, The Number Mysteries, A Mathematical Odyssey Through Everyday Life, Palgrave Macmillan, First published in 2010 by the Fourth Estate, an imprint of Harper Collins UK, 2011, p. 46. - Robert G. Wilson v, Nov 26 2013
  • 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).
  • Bryant Tuckerman, The 24th Mersenne prime, Notices Amer. Math. Soc., 18 (Jun, 1971), Abstract 684-A15, p. 608.

Crossrefs

Cf. A000225 (Mersenne numbers).
Cf. A000043 (Mersenne exponents).
Cf. A001348 (Mersenne numbers with n prime).

Programs

  • GAP
    A000668:=Filtered(List(Filtered([1..600], IsPrime),i->2^i-1),IsPrime); # Muniru A Asiru, Oct 01 2017
    
  • Maple
    A000668 := proc(n) local i;
    i := 2^(ithprime(n))-1:
    if (isprime(i)) then
       return i
    fi: end:
    seq(A000668(n), n=1..31); # Jani Melik, Feb 09 2011
    # Alternate:
    seq(numtheory:-mersenne([i]),i=1..26); # Robert Israel, Jul 13 2014
  • Mathematica
    2^Array[MersennePrimeExponent, 18] - 1 (* Jean-François Alcover, Feb 17 2018, Mersenne primes with less than 1000 digits *)
    2^MersennePrimeExponent[Range[18]] - 1 (* Eric W. Weisstein, Sep 04 2021 *)
  • PARI
    forprime(p=2,1e5,if(ispseudoprime(2^p-1),print1(2^p-1", "))) \\ Charles R Greathouse IV, Jul 15 2011
    
  • PARI
    LL(e) = my(n, h); n = 2^e-1; h = Mod(2, n); for (k=1, e-2, h=2*h*h-1); return(0==h) \\ after Joerg Arndt in A000043
    forprime(p=1, , if(LL(p), print1(p, ", "))) \\ Felix Fröhlich, Feb 17 2018
    
  • Python
    from sympy import isprime, primerange
    print([2**n-1 for n in primerange(1, 1001) if isprime(2**n-1)]) # Karl V. Keller, Jr., Jul 16 2020

Formula

a(n) = sigma(A061652(n)) = A000203(A061652(n)). - Omar E. Pol, Apr 15 2008
a(n) = sigma(A019279(n)) = A000203(A019279(n)), provided that there are no odd superperfect numbers. - Omar E. Pol, May 10 2008
a(n) = A000225(A000043(n)). - Omar E. Pol, Aug 31 2008
a(n) = 2^A000043(n) - 1 = 2^(A000005(A061652(n))) - 1. - Omar E. Pol, Oct 27 2011
a(n) = A000040(A059305(n)) = A001348(A016027(n)). - Omar E. Pol, Jun 29 2012
a(n) = A007947(A000396(n))/2, provided that there are no odd perfect numbers. - Omar E. Pol, Feb 01 2013
a(n) = 4*A134709(n) + 3. - Ivan N. Ianakiev, Sep 07 2013
a(n) = A003056(A000396(n)), provided that there are no odd perfect numbers. - Omar E. Pol, Dec 19 2016
Sum_{n>=1} 1/a(n) = A173898. - Amiram Eldar, Feb 20 2021

A001348 Mersenne numbers: 2^p - 1, where p is prime.

Original entry on oeis.org

3, 7, 31, 127, 2047, 8191, 131071, 524287, 8388607, 536870911, 2147483647, 137438953471, 2199023255551, 8796093022207, 140737488355327, 9007199254740991, 576460752303423487, 2305843009213693951, 147573952589676412927, 2361183241434822606847
Offset: 1

Views

Author

Keywords

Comments

Mersenne numbers A000225 whose indices are primes. - Omar E. Pol, Aug 31 2008
All terms are of the form 4k-1. - Paul Muljadi, Jan 31 2011
Smallest number with Hamming weight A000120 = prime(n). - M. F. Hasler, Oct 16 2018
The 5th, 9th, 10th, ... terms are not prime. See A000668 and A065341 for the primes and for the composites in this sequence. - M. F. Hasler, Nov 14 2018 [corrected by Jerzy R Borysowicz, Apr 08 2025]
Except for the first term 3: all prime factors of 2^p-1 must be 1 or -1 (mod 8), and 1 (mod 2p). - William Hu, Mar 10 2024

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 16.
  • 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).

Crossrefs

Programs

  • Magma
    [2^NthPrime(n)-1: n in [1..30]]; // Vincenzo Librandi, Feb 04 2016
    
  • Maple
    A001348 := n -> 2^(ithprime(n))-1: seq (A001348(n), n=1..18);
  • Mathematica
    Table[2^Prime[n]-1, {n, 20}] (* Vladimir Joseph Stephan Orlovsky, Aug 26 2008 *)
  • PARI
    a(n)=1<Charles R Greathouse IV, Jun 10 2011
    
  • Python
    from sympy import prime
    def a(n): return 2**prime(n)-1
    print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Mar 28 2022

Formula

a(n) = 2^A000040(n) - 1, n >= 1. - Wolfdieter Lang, Oct 26 2014
a(n) = A000225(A000040(n)). - Omar E. Pol, Aug 31 2008
A000668(n) = a(A016027(n)). - Omar E. Pol, Jun 29 2012
Sum_{n>=1} 1/a(n) = A262153. - Amiram Eldar, Nov 20 2020
Product_{n>=1} (1 - 1/a(n)) = A184085. - Amiram Eldar, Nov 22 2022

A054723 Prime exponents of composite Mersenne numbers.

Original entry on oeis.org

11, 23, 29, 37, 41, 43, 47, 53, 59, 67, 71, 73, 79, 83, 97, 101, 103, 109, 113, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331
Offset: 1

Views

Author

Jeppe Stig Nielsen, Apr 20 2000

Keywords

Comments

Primes p such that 2^p-1 is composite.
No proof is known that this sequence is infinite!
Assuming a conjecture of Dickson, we can prove that this sequence is infinite. See Ribenboim. - T. D. Noe, Jul 30 2012
A002515 \ {3} is a subsequence. Any proof that A002515 is infinite would imply that this sequence is infinite. - Jeppe Stig Nielsen, Aug 03 2020

Examples

			p=29 is included because 29 is prime, but 2^29-1 is *not* prime.
		

References

  • Paulo Ribenboim, The New Book of Prime Number Records, Springer, 1996, p. 378.

Crossrefs

Complement of A000043 inside A000040.
Cf. A016027.

Programs

  • Magma
    [p: p in PrimesUpTo(350) | not IsPrime(2^p-1)];  // Bruno Berselli, Oct 11 2012
    
  • Mathematica
    Select[Prime[Range[70]], ! PrimeQ[2^# - 1] &] (* Harvey P. Dale, Feb 03 2011 *)
    Module[{nn=15,mp},mp=MersennePrimeExponent[Range[nn]];Complement[ Prime[ Range[ PrimePi[Last[mp]]]],mp]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 10 2019 *)
  • PARI
    forprime(p=2, 1e3, if(!isprime(2^p-1), print1(p, ", "))) \\ Felix Fröhlich, Aug 10 2014

Extensions

Offset corrected by Arkadiusz Wesolowski, Jul 29 2012

A059305 a(n) = pi(Mersenne(n)): index of n-th Mersenne prime.

Original entry on oeis.org

2, 4, 11, 31, 1028, 12251, 43390, 105097565, 55890484045084135, 10201730804263125133012340
Offset: 1

Views

Author

Reto Keiser (rkeiser(AT)ee.ethz.ch), Jan 25 2001

Keywords

Comments

Similar to A016027, but gives the number of the n-th Mersenne prime (rather than the number of the prime exponent).
A subsequence of A007053 and A086690.

Examples

			Element 2 = 4 because Mersenne2 = (2^3)-1 = 7; 7 is the 4th prime.
		

Crossrefs

Cf. A000043 Mersenne exponents, A000668 Mersenne primes, A016027 pi(mersenne exponents), A001348 Mersenne numbers.

Programs

  • Mathematica
    Array[PrimePi[2^MersennePrimeExponent[#] - 1] &, 8] (* Michael De Vlieger, Apr 21 2019 *)
  • PARI
    LL(e) = if(e==2, return(1)); my(n, h); n = 2^e-1; h = Mod(2, n); for (k=1, e-2, h=2*h*h-1); return(0==h) \\ after Joerg Arndt in A000043
    forprime(p=1, , if(LL(p), print1(primepi(2^p-1), ", "))) \\ Felix Fröhlich, Apr 19 2019

Formula

a(n) = A000720(A000668(n))
a(n) = A007053(A000043(n))
A000668(n) = A000040(a(n)). - Omar E. Pol, Jun 29 2012

Extensions

Revised by Max Alekseyev, Jul 20 2007
a(10) from David Baugh, Oct 08 2020

A060286 a(n) = 2^(p-1)*(2^p-1) where p is prime(n).

Original entry on oeis.org

6, 28, 496, 8128, 2096128, 33550336, 8589869056, 137438691328, 35184367894528, 144115187807420416, 2305843008139952128, 9444732965670570950656, 2417851639228158837784576, 38685626227663735544086528, 9903520314282971830448816128, 40564819207303336344294875201536
Offset: 1

Views

Author

Jason Earls, Mar 23 2001

Keywords

Comments

a(n) is the number whose binary representation is p 1's together with p-1 0's, where p is prime(n), for example: prime(3) = 5 so a(3) = 496 = 111110000 (2). - Omar E. Pol, Dec 12 2012

Examples

			a(4) = 2^6(2^7 - 1) = 8128.
		

References

  • C. Stanley Ogilvy and John T. Anderson, "Excursions in Number Theory", Oxford University Press, NY, 1966 pp. 20-23.

Crossrefs

Programs

  • Mathematica
    Table[2^(Prime[n] - 1)(2^Prime[n] - 1), {n, 16}] (* Alonso del Arte, Dec 12 2012 *)
  • PARI
    { n=0; forprime (p=1, 542, write("b060286.txt", n++, " ", 2^(p - 1)*(2^p - 1)); ) } \\ Harry J. Smith, Jul 03 2009

Formula

For n > 1, a(2n) = 9*T(k) + 1 ; a(2n+1) = 9*T(K) + 1, where T(n) = A000217(n), k = (A121290(n) - 1)/2, K = 2*A121290(n). - Lekraj Beedassy, Sep 12 2006
a(A016027(n)) = A000396(n), assuming there are no odd perfect numbers. - Omar E. Pol, Dec 13 2012

A243905 Multiplicative order of 2 modulo prime(n)^2 for n >= 2.

Original entry on oeis.org

6, 20, 21, 110, 156, 136, 342, 253, 812, 155, 1332, 820, 602, 1081, 2756, 3422, 3660, 4422, 2485, 657, 3081, 6806, 979, 4656, 10100, 5253, 11342, 3924, 3164, 889, 17030, 9316, 19182, 22052, 2265, 8164, 26406, 13861, 29756, 31862, 32580, 18145, 18528, 38612
Offset: 2

Views

Author

Felix Fröhlich, Jun 14 2014

Keywords

Comments

p=prime(n) is in A001220 if and only if a(n) is equal to A014664(n). So far this is known to hold only for p=1093 and p=3511.
This happens for n=183 and 490, that is for p=prime(183)=1093 and p=prime(490)=3511, with values 364 and 1755 (see b-files). - Michel Marcus, Jun 29 2014
If 2^q-1 is p=prime(n), i.e., for n in A016027, then a(n)=pq and lpf(2^a(n)-1)=p. - Thomas Ordowski, Feb 04 2019

Crossrefs

Programs

  • Maple
    seq(numtheory:-order(2, ithprime(i)^2), i=2..1000); # Robert Israel, Jul 08 2014
  • Mathematica
    Table[MultiplicativeOrder[2, Prime[n]^2], {n, 2, 100}] (* Jean-François Alcover, Jul 08 2014 *)
  • PARI
    forprime(p=3, 10^2, print1(znorder(Mod(2, p^2)), ", "))

Formula

a(n) = prime(n)*A014664(n) for all odd primes that are not Wieferich. - Thomas Ordowski, Feb 04 2019

A157894 Number of composite numbers between exponents of successive Mersenne primes.

Original entry on oeis.org

0, 1, 1, 4, 3, 1, 9, 23, 22, 14, 17, 327, 73, 576, 803, 67, 820, 908, 151, 4672, 222, 1141, 7827, 1583, 1352, 19255, 37986, 22155, 19704, 77081, 499295, 95038, 369638, 130508, 1469735, 42125, 3694547, 6091617, 7076983, 2861035, 1815190, 4178608, 2054002, 4310827
Offset: 1

Views

Author

Jani Melik, Mar 08 2009, Apr 02 2009

Keywords

Examples

			a(1) = 0 since 2 is adjacent to 3 (exponent of 2nd Mersenne prime).
a(2) = 1 since 4 is between 3 and 5 (exponent of 3rd Mersenne prime).
a(3) = 1 since 6 is between 5 and 7 (exponent of 4th Mersenne prime).
a(4) = 4 since 8, 9, 10, and 12 are between 7 and 13 (exponent of 5th Mersenne prime).
		

Crossrefs

Programs

  • Mathematica
    mp={ (*A000043 *) }; lst = {}; Do[ c = mp[[n + 1]] - mp[[n]] - PrimePi@ mp[[n + 1]] + PrimePi@ mp[[n]]; AppendTo[lst, c], {n, 38}]; lst (* Robert G. Wilson v, Mar 14 2009 *)

Formula

a(n) = A000043(n+1) - A016027(n+1) - A000043(n) + A016027(n). - Amiram Eldar, Oct 17 2024

Extensions

a(34)-a(38) from Robert G. Wilson v, Mar 14 2009
a(39)-a(44) from Amiram Eldar, Oct 17 2024

A135701 First differences of indices of A000043.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 7, 6, 4, 3, 67, 13, 96, 121, 11, 116, 128, 19, 594, 30, 131, 897, 181, 156, 2033, 3760, 2105, 1842, 6961, 41453, 7556, 28716, 9974, 108217, 3031, 256669, 402707, 452111, 179537, 113178, 258898, 126198, 263183, 313608, 26616, 833014
Offset: 1

Views

Author

Omar E. Pol, Mar 02 2008

Keywords

Comments

First differences of A016027.
This sequence is related to the perfect numbers A000396 and the Mersenne primes A000668.

Examples

			a(16) = 11 because A000043(16 + 1) = 2281 is the 339 n-th prime, then A016027(16 + 1) = 339 and A000043(16) = 2203 is the 328 n-th prime, then A016027(16) = 328 and we can write 339 - 328 = 11.
		

Crossrefs

Programs

  • Mathematica
    Differences@ PrimePi@ Array[MersennePrimeExponent, 45] (* Michael De Vlieger, Dec 18 2017 *)

Formula

a(n) = pi(A000043(n+1)) - pi(A000043(n)), where pi is A000720.
a(n) = A016027(n+1) - A016027(n).

Extensions

a(39) (based on update to A016027) from Ken Takusagawa, May 31 2011
a(40)-a(44) (based on update to A016027) from Patrick J. McNab, Jan 27 2018
a(45)-a(46) from Ivan Panchenko, Apr 12 2018
a(47) from Amiram Eldar, Sep 05 2024
Showing 1-10 of 13 results. Next