OFFSET
1,2
COMMENTS
The sequence tends to decrease at runs of Ramanujan primes and at twin Ramanujan primes.
Is 4 the minimum value of a(n) for all n > 1? Is the sequence unbounded? What are its liminf and limsup? Is a(n)/n bounded?
Christian Axler has proved that the answers to the 1st, 2nd, and 4th questions are yes, and that liminf a(n) = limsup a(n) = infinity. - Jonathan Sondow, Feb 12 2014
a(n) > n, for 1 < n < 86853959 = limit. For limit, a(n) = 135595760, a(n) - n = 48741801. - John W. Nicholson, Dec 19 2013
LINKS
John W. Nicholson, Table of n, a(n) for n = 1..10000
Christian Axler, On generalized Ramanujan primes, arXiv:1401.7179 [math.NT], 2014.
Jonathan Sondow, Ramanujan primes and Bertrand's postulate, Amer. Math. Monthly, 116 (2009), 630-635; arXiv:0907.5232 [math.NT], 2009-2010.
Jonathan Sondow, J. W. Nicholson, and T. D. Noe, Ramanujan Primes: Bounds, Runs, Twins, and Gaps, arXiv:1105.2249 [math.NT], 2011; J. Integer Seq. 14 (2011) Article 11.6.2.
FORMULA
EXAMPLE
R(2) - prime(4) = 11 - 7 and R(3) - prime(6) = 17 - 13, so a(2) = a(3) = 4.
MATHEMATICA
nn = 60; R = Table[0, {nn}]; s = 0;
Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s < nn, R[[s + 1]] = k], {k, Prime[3 nn]}];
R = R + 1;
Table[R[[n]] - Prime[2 n], {n, 1, nn}] (* Jean-François Alcover, Nov 07 2018, using T. D. Noe's code for R *)
CROSSREFS
KEYWORD
sign
AUTHOR
Jonathan Sondow, Dec 15 2013
STATUS
approved