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.

A280379 a(n) = A056171(k) - m, where k=prime(n) and m is the Ramanujan prime index to the greatest Ramanujan prime R(m) <= k.

Original entry on oeis.org

0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 2, 0, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 0, 1, 2, 2, 3, 2, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 2, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0
Offset: 1

Views

Author

John W. Nicholson, Jan 01 2017

Keywords

Comments

a(n)=0 corresponds to the Ramanujan prime R_m = A104272(m) = A056171(k).

Examples

			For prime(30)=113, A056171(113) = 14, 107 is R_12 and 127 is R_13, so 14 -12 = 2 (first occurrence).
		

Crossrefs

Programs

  • PARI
    \\RR[x] is a list of Ramanujan primes, A104272.
    {plimit=1.1*10^4;n=s=0;
    forprime(p=2,plimit,
        s++;
        if(p==RR[n+1],n++);
        print1(s-primepi(floor(p/2))-n,", ");
        )
    }

Formula

a(n) = A056171(k) - m, where k=prime(n) and m is the Ramanujan prime index to the greatest Ramanujan prime R_m = A104272(m) <= k.