cp's OEIS Frontend

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.

A233739 R(n) - prime(2n), where R(n) is the n-th Ramanujan prime and prime(n) is the n-th prime.

Original entry on oeis.org

-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

Views

Author

Jonathan Sondow, Dec 15 2013

Keywords

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

Examples

			R(2) - prime(4) = 11 - 7 and R(3) - prime(6) = 17 - 13, so a(2) = a(3) = 4.
		

Crossrefs

Cf. A000040, A104272, A233740. Records are A233741.

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 *)

Formula

a(n) = A104272(n) - A000040(2n).
a(n) = 2*A233740(n) for n > 1.
a(n) >= 2 for n > 1 (see "Ramanujan primes and Bertrand's postulate").
a(n)/p(2n) = R(n)/p(2n) - 1 -> 0 as n -> infinity (see same link).