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.
%I A059305 #33 Apr 03 2023 10:36:09 %S A059305 2,4,11,31,1028,12251,43390,105097565,55890484045084135, %T A059305 10201730804263125133012340 %N A059305 a(n) = pi(Mersenne(n)): index of n-th Mersenne prime. %C A059305 Similar to A016027, but gives the number of the n-th Mersenne prime (rather than the number of the prime exponent). %C A059305 A subsequence of A007053 and A086690. %H A059305 Andrew R. Booker, <a href="https://t5k.org/nthprime/">The Nth Prime Page</a> %H A059305 C. K. Caldwell, <a href="http://www.utm.edu/research/primes/mersenne/index.html">Mersenne Primes</a> %H A059305 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 A059305 Xavier Gourdon and Pascal Sebah, <a href="http://numbers.computation.free.fr/Constants/Primes/countingPrimes.html">Counting primes</a> %H A059305 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 A059305 a(n) = A000720(A000668(n)) %F A059305 a(n) = A007053(A000043(n)) %F A059305 A000668(n) = A000040(a(n)). - _Omar E. Pol_, Jun 29 2012 %e A059305 Element 2 = 4 because Mersenne2 = (2^3)-1 = 7; 7 is the 4th prime. %t A059305 Array[PrimePi[2^MersennePrimeExponent[#] - 1] &, 8] (* _Michael De Vlieger_, Apr 21 2019 *) %o A059305 (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 A059305 forprime(p=1, , if(LL(p), print1(primepi(2^p-1), ", "))) \\ _Felix Fröhlich_, Apr 19 2019 %Y A059305 Cf. A000043 Mersenne exponents, A000668 Mersenne primes, A016027 pi(mersenne exponents), A001348 Mersenne numbers. %K A059305 nonn,hard,more %O A059305 1,1 %A A059305 Reto Keiser (rkeiser(AT)ee.ethz.ch), Jan 25 2001 %E A059305 Revised by _Max Alekseyev_, Jul 20 2007 %E A059305 a(10) from _David Baugh_, Oct 08 2020