A233739 R(n) - prime(2n), where R(n) is the n-th Ramanujan prime and prime(n) is the n-th prime.
-1, 4, 4, 10, 12, 10, 16, 14, 10, 26, 22, 18, 26, 42, 38, 36, 40, 30, 64, 56, 52, 46, 42, 40, 40, 42, 56, 48, 76, 68, 74, 62, 84, 72, 70, 72, 60, 56, 64, 78, 70, 70, 126, 114, 124, 114, 108, 98, 86, 100, 86, 78, 76, 66
Offset: 1
Keywords
Examples
R(2) - prime(4) = 11 - 7 and R(3) - prime(6) = 17 - 13, so a(2) = a(3) = 4.
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.
Programs
-
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 *)
Comments