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.

A117293 Mersenne primes written in binary.

Original entry on oeis.org

11, 111, 11111, 1111111, 1111111111111, 11111111111111111, 1111111111111111111, 1111111111111111111111111111111, 1111111111111111111111111111111111111111111111111111111111111
Offset: 1

Views

Author

Jacob Vecht, Apr 23 2006

Keywords

Comments

The number of bits in a(n) is equal to A000043(n). - Omar E. Pol, Feb 22 2008

Examples

			The third Mersenne prime is 31, i.e., 11111 in binary.
		

Crossrefs

Programs

  • Mathematica
    Map[(10^# - 1)/9 &, MersennePrimeExponent[Range[9]]] (* Amiram Eldar, Oct 22 2024 *)
  • PARI
    apply(p->fromdigits(binary(p)), select(isprime, vector(20,n,2^prime(n)-1))) \\ Charles R Greathouse IV, Sep 14 2016

Formula

a(n) = A007088(A000668(n)). - Amiram Eldar, Oct 22 2024