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 25 results. Next

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

A107006 Primes of the form 4x^2-4xy+7y^2, with x and y nonnegative.

Original entry on oeis.org

7, 31, 79, 103, 127, 151, 199, 223, 271, 367, 439, 463, 487, 607, 631, 727, 751, 823, 919, 967, 991, 1039, 1063, 1087, 1231, 1279, 1303, 1327, 1399, 1423, 1447, 1471, 1543, 1567, 1663, 1759, 1783, 1831, 1879, 1951, 1999, 2143, 2239, 2287, 2311
Offset: 1

Views

Author

T. D. Noe, May 09 2005

Keywords

Comments

Discriminant=-96.
Also, primes of the form 24n+7. - Artur Jasinski, Nov 25 2007 [See the Reble link]
Also primes of the forms 4x^2+4xy+7y^2, 7x^2+6xy+15y^2, 7x^2+2xy+7y^2 and 7x^2+4xy+28y^2. See A140633. - T. D. Noe, May 19 2008
Also, primes of form u^2+6v^2 with odd v while sequence A107008 is even v. This can be seen by expressing its form as (2x-y)^2+6y^2 (where y can only be odd) while the latter is x^2+6(2y)^2. Additionally, this sequence is 7 mod 24 while the second is 1 mod 24 and together, they are the primes of form x^2+6y^2 (A033199) which are either {1,7} mod 24. - Tito Piezas III, Jan 01 2009

Crossrefs

Cf. A124477.

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[24n + 7], AppendTo[a, 24n + 7]], {n, 0, 100}]; a (* Artur Jasinski, Nov 25 2007 *)
    QuadPrimes2[4, -4, 7, 10000] (* see A106856 *)
    Select[24*Range[0,4000]+7,PrimeQ] (* Harvey P. Dale, May 13 2018 *)

Extensions

Recomputed b-file and deleted erroneous Mma program by N. J. A. Sloane, Jun 08 2014

A112633 Mersenne prime indices that are also Gaussian primes.

Original entry on oeis.org

3, 7, 19, 31, 107, 127, 607, 1279, 2203, 4423, 86243, 110503, 216091, 756839, 1257787, 20996011, 24036583, 25964951, 37156667
Offset: 1

Views

Author

Jorge Coveiro, Dec 27 2005

Keywords

Comments

Also, primes p (A000043) such that 2^p-1 is prime (A000668) and congruent to 7 mod 5!. - Artur Jasinski, Sep 30 2008. Proof that this is the same sequence, from Jeppe Stig Nielsen, Jan 02 2018: An odd index p>2 will be either 1 or 3 mod 4. If it is 1, then 2^p = 2^(4k+1) will be 2 mod 5, and be 0 mod 4, and be 2 mod 3. This completely determines 2^p (and hence 2^p - 1) mod 5!. The other case, when p is 3 mod 4, will make 2^p congruent to 3 mod 5, to 0 mod 4, and to 2 mod 3. This leads to the other (distinct) value of 2^p mod 5!.

Crossrefs

Programs

  • Mathematica
    p = {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, 43112609}; a = {}; Do[If[Mod[2^p[[n]] - 1, 5! ] == 7, AppendTo[a, p[[n]]]], {n, 1, Length[p]}]; a (* Artur Jasinski, Sep 30 2008 *)
    Select[{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,43112609}, Mod[2^#-1,120]==7&] (* Harvey P. Dale, Nov 26 2013 *)
    Select[MersennePrimeExponent[Range[48]], PowerMod[2, #, 120] == 8 &] (* Amiram Eldar, Oct 19 2024 *)
  • Python
    from itertools import count, islice
    from sympy import isprime, prime
    def A112633_gen(): # generator of terms
        return filter(lambda p: p&2 and isprime((1<A112633_list = list(islice(A112633_gen(),10)) # Chai Wah Wu, Mar 21 2023

Formula

The intersection of A000043 and A002145. - R. J. Mathar, Oct 06 2008

Extensions

Edited by N. J. A. Sloane, Jan 06 2018
a(19) from Ivan Panchenko, Apr 12 2018

A173898 Decimal expansion of sum of the reciprocals of the Mersenne primes.

Original entry on oeis.org

5, 1, 6, 4, 5, 4, 1, 7, 8, 9, 4, 0, 7, 8, 8, 5, 6, 5, 3, 3, 0, 4, 8, 7, 3, 4, 2, 9, 7, 1, 5, 2, 2, 8, 5, 8, 8, 1, 5, 9, 6, 8, 5, 5, 3, 4, 1, 5, 4, 1, 9, 7, 0, 1, 4, 4, 1, 9, 3, 1, 0, 6, 5, 2, 7, 3, 5, 6, 8, 7, 0, 1, 4, 4, 0, 2, 1, 2, 7, 2, 3, 4, 9, 9, 1, 5, 4, 8, 8, 3, 2, 9, 3, 6, 6, 6, 2, 1, 5, 3, 7, 4, 0, 3, 2, 4
Offset: 0

Views

Author

Jonathan Vos Post, Mar 01 2010

Keywords

Comments

We know this a priori to be strictly less than the Erdős-Borwein constant (A065442), which Erdős (1948) showed to be irrational. This new constant would also seem to be irrational.

Examples

			Decimal expansion of (1/3) + (1/7) + (1/31) + (1/127) + (1/8191) + (1/131071) + (1/524287) + ... = .5164541789407885653304873429715228588159685534154197.
This has continued fraction expansion 0 + 1/(1 + 1/(1 + 1/(14 + 1/(1 + ...)))) (see A209601).
		

Crossrefs

Cf. A209601, A000668, A065442 (decimal expansion of Erdos-Borwein constant), A000043, A001348, A046051, A057951-A057958, A034876, A124477, A135659, A019279, A061652, A000225.

Programs

  • Maple
    Digits := 120 ; L := [ 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 ] ;
    x := 0 ; for i from 1 to 30 do x := x+1.0/(2^op(i,L)-1 ); end do ;
  • Mathematica
    RealDigits[Sum[1/(2^p - 1), {p, MersennePrimeExponent[Range[14]]}], 10, 100][[1]] (* Amiram Eldar, May 24 2020 *)
  • PARI
    isM(p)=my(m=Mod(4,2^p-1));for(i=1,p-2,m=m^2-2);!m
    s=1/3;forprime(p=3,default(realprecision)*log(10)\log(2), if(isM(p), s+=1./(2^p-1)));s \\ Charles R Greathouse IV, Mar 22 2012

Formula

Sum_{i>=1} 1/A000668(i).

Extensions

Entry revised by N. J. A. Sloane, Mar 10 2012

A135657 Nonprimes of the form 24n+7.

Original entry on oeis.org

55, 175, 247, 295, 319, 343, 391, 415, 511, 535, 559, 583, 655, 679, 703, 775, 799, 847, 871, 895, 943, 1015, 1111, 1135, 1159, 1183, 1207, 1255, 1351, 1375, 1495, 1519, 1591, 1615, 1639, 1687, 1711, 1735, 1807, 1855, 1903, 1927, 1975, 2023, 2047, 2071
Offset: 1

Views

Author

Artur Jasinski, Nov 25 2007

Keywords

Crossrefs

Programs

  • Magma
    [a: n in [0..100] | not IsPrime(a) where a is 24*n+7]; // Vincenzo Librandi, Mar 22 2014
  • Mathematica
    a = {}; Do[If[PrimeQ[24n + 7],[null], AppendTo[a, 24n + 7]], {n, 0, 1000}]; a
    Select[24 Range[100] + 7, ! PrimeQ@# &] (* Vincenzo Librandi, Mar 22 2014 *)

A139484 Indices of Mersenne primes among primes of the form 24k + 7 (A107006).

Original entry on oeis.org

1, 2, 5, 129, 1536, 5430, 13138099
Offset: 2

Views

Author

Artur Jasinski, Apr 23 2008

Keywords

Comments

All Mersenne primes with the exception of the first one (3) are of the form 24*k + 7.
Sequence lists indices m where A139483(m) is a Mersenne prime.

Examples

			5 is in this sequence, because A107006(5) is a Mersenne prime.
		

Crossrefs

Programs

Extensions

Edited name and added example by Dmitry Kamenetsky, Jan 02 2011
a(8) from Charles R Greathouse IV, Mar 22 2011

A145041 Primes p (A000043) such that 2^p-1 is prime (A000668) and congruent to 31 mod 6!.

Original entry on oeis.org

5, 17, 89, 521, 4253, 9689, 9941, 11213, 19937, 21701, 859433, 1398269, 2976221, 3021377, 6972593, 32582657, 43112609, 57885161
Offset: 1

Views

Author

Artur Jasinski, Sep 30 2008

Keywords

Comments

Mersenne numbers (with the exception of the first two) are congruent to 31, 127, 271, 607 mod 6!. This sequence is a subsequence of A000043.

Crossrefs

Programs

  • Mathematica
    p = {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, 43112609}; a = {}; Do[If[Mod[2^p[[n]] - 1, 6! ] == 31, AppendTo[a, p[[n]]]], {n, 1, Length[p]}]; a
    Select[MersennePrimeExponent[Range[48]], PowerMod[2, #, 720] == 32 &] (* Amiram Eldar, Oct 19 2024 *)

Extensions

a(18) from Amiram Eldar, Oct 19 2024

A145042 Primes p (A000043) such that 2^p-1 is prime (A000668) and congruent to 127 mod 6!.

Original entry on oeis.org

7, 19, 31, 127, 607, 1279, 2203, 4423, 110503, 216091, 1257787, 20996011, 24036583
Offset: 1

Views

Author

Artur Jasinski, Sep 30 2008

Keywords

Comments

Mersenne numbers (with the exception of the first two) are congruent to 31, 127, 271, 607 mod 6!. This sequence is a subsequence of A000043.

Crossrefs

Programs

  • Mathematica
    p = {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, 43112609}; a = {}; Do[If[Mod[2^p[[n]] - 1, 6! ] == 127, AppendTo[a, p[[n]]]], {n, 1, Length[p]}]; a

A139479 Numbers k such that 24*k+7 is a term of A000043.

Original entry on oeis.org

0, 1, 5, 25, 53, 184, 4604, 1001524
Offset: 1

Views

Author

Artur Jasinski, Apr 22 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Select[(MersennePrimeExponent[Range[48]] - 7) / 24, IntegerQ] (* Amiram Eldar, Oct 17 2024 *)

A145038 Numbers to which Mersenne primes 2^p-1 can be congruent mod k! (for k > 1).

Original entry on oeis.org

1, 3, 7, 31, 127, 271, 607, 2047, 3151, 8191, 10111, 40447, 42367, 48511, 50431, 80767, 88831, 90751, 121087, 131071, 161407, 163327, 169471, 171391, 201727, 209791, 211711, 243967, 250111, 282367, 290431, 292351, 322687, 324607, 332671
Offset: 1

Views

Author

Artur Jasinski, Sep 30 2008

Keywords

Comments

All Mersenne primes are congruent to 1 mod 2!, 1 mod 3! (with the exception of the first one), 7 mod 4! (with the exception of the first one), 7 mod 5! (see A112633), or 31 mod 5! (see A145040).

Crossrefs

Showing 1-10 of 25 results. Next