[go: up one dir, main page]

login
A117293
Mersenne primes written in binary.
7
11, 111, 11111, 1111111, 1111111111111, 11111111111111111, 1111111111111111111, 1111111111111111111111111111111, 1111111111111111111111111111111111111111111111111111111111111
OFFSET
1,1
COMMENTS
The number of bits in a(n) is equal to A000043(n). - Omar E. Pol, Feb 22 2008
LINKS
FORMULA
a(n) = A007088(A000668(n)). - Amiram Eldar, Oct 22 2024
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