OFFSET
1,2
COMMENTS
a(n) = k = pi(p_k) = pi(R_n), where pi is the prime number counting function and R_n is the n-th Ramanujan prime. I.e., p_k, the k-th prime, is the n-th Ramanujan prime.
Prime index of A168421(n), that is A000720(A168421(n)), is equal to a(n) - n + 1. - John W. Nicholson, Sep 16 2015
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Christian Axler, On the number of primes up to the nth Ramanujan prime, arXiv:1711.04588 [math.NT], 2017.
Christian Axler, On Ramanujan primes, Functiones et Approximatio Commentarii Mathematici (2019).
S. Ramanujan, A proof of Bertrand's postulate, J. Indian Math. Soc., 11 (1919), 181-182.
H. W. Shapiro, Iterates of arithmetic functions and a property of the sequence of primes, Pacific J. Math. Volume 3, Number 3 (1953), 647-655.
J. Sondow, Ramanujan primes and Bertrand's postulate, Amer. Math. Monthly, 116 7(2009), 630-635.
J. Sondow, Ramanujan primes and Bertrand's postulate, arXiv:0907.5232 [math.NT], 2009, 2010.
J. Sondow, J. W. Nicholson, and T. D. Noe, Ramanujan Primes: Bounds, Runs, Twins, and Gaps, J. Integer Seq. 14 (2011) Article 11.6.2.
Wikipedia, Ramanujan prime
FORMULA
EXAMPLE
The 10th Ramanujan prime is 97, and pi(97) = 25, so a(10) = 25.
MATHEMATICA
f[n_] := With[{s = Table[{k, PrimePi[k] - PrimePi[k/2]}, {k, Prime[3 n]}]}, Table[1 + First@ Last@ Select[s, Last@ # == i - 1 &], {i, n}]]; PrimePi@ f@ 63 (* Michael De Vlieger, Nov 14 2017, after Jonathan Sondow at A104272 *)
PROG
(Perl) use ntheory ":all"; say prime_count(nth_ramanujan_prime($_)) for 1..100; # Dana Jacobsen, Dec 25 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
John W. Nicholson, Jul 02 2010
STATUS
approved