A059305 a(n) = pi(Mersenne(n)): index of n-th Mersenne prime.
2, 4, 11, 31, 1028, 12251, 43390, 105097565, 55890484045084135, 10201730804263125133012340
Offset: 1
Examples
Element 2 = 4 because Mersenne2 = (2^3)-1 = 7; 7 is the 4th prime.
Links
- Andrew R. Booker, The Nth Prime Page
- C. K. Caldwell, Mersenne Primes
- M. Deleglise and J. Rivat, Computing pi(x): the Meissel, Lehmer, Lagarias, Miller, Odlyzko method, Math. Comp., 65 (1996), 235-245.
- Xavier Gourdon and Pascal Sebah, Counting primes
- Tomás Oliveira e Silva, Tables of values of pi(x) and of pi2(x)
Crossrefs
Programs
-
Mathematica
Array[PrimePi[2^MersennePrimeExponent[#] - 1] &, 8] (* Michael De Vlieger, Apr 21 2019 *)
-
PARI
LL(e) = if(e==2, return(1)); my(n, h); n = 2^e-1; h = Mod(2, n); for (k=1, e-2, h=2*h*h-1); return(0==h) \\ after Joerg Arndt in A000043 forprime(p=1, , if(LL(p), print1(primepi(2^p-1), ", "))) \\ Felix Fröhlich, Apr 19 2019
Formula
Extensions
Revised by Max Alekseyev, Jul 20 2007
a(10) from David Baugh, Oct 08 2020
Comments