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.

A001348 Mersenne numbers: 2^p - 1, where p is prime.

Original entry on oeis.org

3, 7, 31, 127, 2047, 8191, 131071, 524287, 8388607, 536870911, 2147483647, 137438953471, 2199023255551, 8796093022207, 140737488355327, 9007199254740991, 576460752303423487, 2305843009213693951, 147573952589676412927, 2361183241434822606847
Offset: 1

Views

Author

Keywords

Comments

Mersenne numbers A000225 whose indices are primes. - Omar E. Pol, Aug 31 2008
All terms are of the form 4k-1. - Paul Muljadi, Jan 31 2011
Smallest number with Hamming weight A000120 = prime(n). - M. F. Hasler, Oct 16 2018
The 5th, 9th, 10th, ... terms are not prime. See A000668 and A065341 for the primes and for the composites in this sequence. - M. F. Hasler, Nov 14 2018 [corrected by Jerzy R Borysowicz, Apr 08 2025]
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

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 16.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 47.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [2^NthPrime(n)-1: n in [1..30]]; // Vincenzo Librandi, Feb 04 2016
    
  • Maple
    A001348 := n -> 2^(ithprime(n))-1: seq (A001348(n), n=1..18);
  • Mathematica
    Table[2^Prime[n]-1, {n, 20}] (* Vladimir Joseph Stephan Orlovsky, Aug 26 2008 *)
  • PARI
    a(n)=1<Charles R Greathouse IV, Jun 10 2011
    
  • Python
    from sympy import prime
    def a(n): return 2**prime(n)-1
    print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Mar 28 2022

Formula

a(n) = 2^A000040(n) - 1, n >= 1. - Wolfdieter Lang, Oct 26 2014
a(n) = A000225(A000040(n)). - Omar E. Pol, Aug 31 2008
A000668(n) = a(A016027(n)). - Omar E. Pol, Jun 29 2012
Sum_{n>=1} 1/a(n) = A262153. - Amiram Eldar, Nov 20 2020
Product_{n>=1} (1 - 1/a(n)) = A184085. - Amiram Eldar, Nov 22 2022