%I M2694 N1079 #155 Oct 24 2024 12:34:02
%S 3,7,31,127,2047,8191,131071,524287,8388607,536870911,2147483647,
%T 137438953471,2199023255551,8796093022207,140737488355327,
%U 9007199254740991,576460752303423487,2305843009213693951,147573952589676412927,2361183241434822606847
%N Mersenne numbers: 2^p - 1, where p is prime.
%C Mersenne numbers A000225 whose indices are primes. - _Omar E. Pol_, Aug 31 2008
%C All terms are of the form 4k-1. - _Paul Muljadi_, Jan 31 2011
%C Smallest number with Hamming weight A000120 = prime(n). - _M. F. Hasler_, Oct 16 2018
%C The 5th, 8th, 9th, ... terms are not prime. See A000668 for the primes in this sequence. - _M. F. Hasler_, Nov 14 2018
%C 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
%D G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 16.
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H T. D. Noe, <a href="/A001348/b001348.txt">Table of n, a(n) for n = 1..100</a>
%H Raymond Clare Archibald, <a href="https://primes.utm.edu/mersenne/LukeMirror/lit/lit_008s.htm">Mersenne's Numbers</a>, Scripta Mathematica, Vol. 3 (1935), pp. 112-119.
%H John Brillhart, D. H. Lehmer, J. L. Selfridge, Bryant Tuckerman and S. S. Wagstaff, Jr., <a href="http://www.ams.org/books/conm/022/">Cunningham Project</a> [Factorizations of b^n +- 1, b = 2, 3, 5, 6, 7, 10, 11, 12 up to high powers]
%H C. K. Caldwell, <a href="http://www.utm.edu/research/primes/mersenne/index.html">Mersenne Primes</a>
%H Will Edgington, <a href="https://web.archive.org/web/20060630100606/http://www.garlic.com:80/~wedgingt/mersenne.html">Mersenne Page</a>> [from Internet Archive Wayback Machine].
%H Graham Everest, Shaun Stevens, Duncan Tamsett and Tom Ward, <a href="http://www.jstor.org/stable/27642221">Primes generated by recurrence sequences</a>, Amer. Math. Monthly, Vol. 114, No. 5 (2007), pp. 417-431.
%H Paul Garrett, <a href="http://www.math.umn.edu/~garrett/m/number_theory/lucas_lehmer.pdf">Lucas-Lehmer criterion for primality of Mersenne numbers</a>, 2010.
%H Jiří Klaška, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL25/Klaska/klaska2.html">A Simple Proof of Skula's Theorem on Prime Power Divisors of Mersenne Numbers</a>, J. Int. Seq., Vol. 25 (2022), Article 22.4.3.
%H Gabriel Lapointe, <a href="https://arxiv.org/abs/1904.12032">On finding the smallest happy numbers of any heights</a>, arXiv:1904.12032 [math.NT], 2019.
%H Romeo Meštrović, <a href="http://arxiv.org/abs/1202.3670">Euclid's theorem on the infinitude of primes: a historical survey of its proofs (300 BC--2012) and another new proof</a>, arXiv preprint arXiv:1202.3670 [math.HO], 2012.
%H Anthony G. Shannon, Hakan Akkuş, Yeşim Aküzüm, Ömür Deveci, and Engin Özkan, <a href="https://doi.org/10.7546/nntdm.2024.30.3.530-537">A partial recurrence Fibonacci link</a>, Notes Num. Theor. Disc. Math. (2024) Vol. 30, No. 3, 530-537. See Table 1, p. 531.
%H Amelia Carolina Sparavigna, <a href="https://doi.org/10.18483/ijSci.2188">Some Groupoids and their Representations by Means of Integer Sequences</a>, International Journal of Sciences (2019) Vol. 8, No. 10.
%H Thesaurus.maths.org, <a href="https://web.archive.org/web/20080704163731/http://thesaurus.maths.org/dictionary/map/word/3371">Mersenne Number</a>.
%H Gérard Villemin's Almanach of Numbers, <a href="http://villemin.gerard.free.fr/Wwwgvmm/Decompos/Mersenne.htm">Nombre de Mersenne</a>.
%H Eric Wegrzynowski, <a href="https://web.archive.org/web/20080210025036/http://www.lifl.fr/~wegrzyno/Mersenne/mersenne1.html">Nombres de Mersenne</a>. [from Internet Archive Wayback Machine]
%H K. Zsigmondy, <a href="https://doi.org/10.1007/BF01692444">Zur Theorie der Potenzreste</a>, Monatsh. Math., Vol. 3 (1892), pp. 265-284.
%F a(n) = 2^A000040(n) - 1, n >= 1. - _Wolfdieter Lang_, Oct 26 2014
%F a(n) = A000225(A000040(n)). - _Omar E. Pol_, Aug 31 2008
%F A000668(n) = a(A016027(n)). - _Omar E. Pol_, Jun 29 2012
%F Sum_{n>=1} 1/a(n) = A262153. - _Amiram Eldar_, Nov 20 2020
%F Product_{n>=1} (1 - 1/a(n)) = A184085. - _Amiram Eldar_, Nov 22 2022
%p A001348 := n -> 2^(ithprime(n))-1: seq (A001348(n), n=1..18);
%t Table[2^Prime[n]-1, {n, 20}] (* _Vladimir Joseph Stephan Orlovsky_, Aug 26 2008 *)
%o (PARI) a(n)=1<<prime(n)-1 \\ _Charles R Greathouse IV_, Jun 10 2011
%o (Magma) [2^NthPrime(n)-1: n in [1..30]]; // _Vincenzo Librandi_, Feb 04 2016
%o (Python)
%o from sympy import prime
%o def a(n): return 2**prime(n)-1
%o print([a(n) for n in range(1, 21)]) # _Michael S. Branicky_, Mar 28 2022
%Y Cf. A000043, A000668, A046051, A057951-A057958, A100105, A184085, A262153.
%Y Cf. A000040, A000225. - _Omar E. Pol_, Aug 31 2008
%Y Cf. A002145, A045326.
%K nonn,nice,easy
%O 1,1
%A _N. J. A. Sloane_