This site is supported by donations to The OEIS Foundation.
Mersenne numbers
From OeisWiki
(Redirected from Mersenne number)
2 n − 1 |
n |
2 p − 1 |
p |
2 n − 1 |
- {0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, ...}
2 p − 1 |
p |
- {3, 7, 31, 127, 2047, 8191, 131071, 524287, 8388607, 536870911, 2147483647, 137438953471, 2199023255551, 8796093022207, 140737488355327, 9007199254740991, 576460752303423487, ...}
The Mersenne primes are a subsequence of A001348, which is itself a subsequence of A000225.
A necessary, but not sufficient, condition for a Mersenne number (repunit base 2) to be prime is to have a prime number of 1s, otherwise you can interpret the repunit as if it is in base 1 (tally marks), factorize it, then reinterpret the base 1 (tally marks) factors in base 2!
Generating functions
The ordinary generating function of base 2 repunits is
The exponential generating function of base 2 repunits is