OFFSET
1,1
COMMENTS
The number of bits in a(n) is equal to A000043(n). - Omar E. Pol, Feb 22 2008
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..14
Wikipedia, Mersenne prime.
FORMULA
EXAMPLE
The third Mersenne prime is 31, i.e., 11111 in binary.
MATHEMATICA
Map[(10^# - 1)/9 &, MersennePrimeExponent[Range[9]]] (* Amiram Eldar, Oct 22 2024 *)
PROG
(PARI) apply(p->fromdigits(binary(p)), select(isprime, vector(20, n, 2^prime(n)-1))) \\ Charles R Greathouse IV, Sep 14 2016
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Jacob Vecht, Apr 23 2006
STATUS
approved