login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = pi(Mersenne(n)): index of n-th Mersenne prime.
30

%I #33 Apr 03 2023 10:36:09

%S 2,4,11,31,1028,12251,43390,105097565,55890484045084135,

%T 10201730804263125133012340

%N a(n) = pi(Mersenne(n)): index of n-th Mersenne prime.

%C Similar to A016027, but gives the number of the n-th Mersenne prime (rather than the number of the prime exponent).

%C A subsequence of A007053 and A086690.

%H Andrew R. Booker, <a href="https://t5k.org/nthprime/">The Nth Prime Page</a>

%H C. K. Caldwell, <a href="http://www.utm.edu/research/primes/mersenne/index.html">Mersenne Primes</a>

%H M. Deleglise and J. Rivat, <a href="http://dx.doi.org/10.1090/S0025-5718-96-00674-6">Computing pi(x): the Meissel, Lehmer, Lagarias, Miller, Odlyzko method</a>, Math. Comp., 65 (1996), 235-245.

%H Xavier Gourdon and Pascal Sebah, <a href="http://numbers.computation.free.fr/Constants/Primes/countingPrimes.html">Counting primes</a>

%H Tomás Oliveira e Silva, <a href="http://www.ieeta.pt/%7Etos/primes.html">Tables of values of pi(x) and of pi2(x)</a>

%F a(n) = A000720(A000668(n))

%F a(n) = A007053(A000043(n))

%F A000668(n) = A000040(a(n)). - _Omar E. Pol_, Jun 29 2012

%e Element 2 = 4 because Mersenne2 = (2^3)-1 = 7; 7 is the 4th prime.

%t Array[PrimePi[2^MersennePrimeExponent[#] - 1] &, 8] (* _Michael De Vlieger_, Apr 21 2019 *)

%o (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

%o forprime(p=1, , if(LL(p), print1(primepi(2^p-1), ", "))) \\ _Felix Fröhlich_, Apr 19 2019

%Y Cf. A000043 Mersenne exponents, A000668 Mersenne primes, A016027 pi(mersenne exponents), A001348 Mersenne numbers.

%K nonn,hard,more

%O 1,1

%A Reto Keiser (rkeiser(AT)ee.ethz.ch), Jan 25 2001

%E Revised by _Max Alekseyev_, Jul 20 2007

%E a(10) from _David Baugh_, Oct 08 2020