OFFSET
1,30
FORMULA
EXAMPLE
For prime(30)=113, A056171(113) = 14, 107 is R_12 and 127 is R_13, so 14 -12 = 2 (first occurrence).
PROG
(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, ", ");
)
}
CROSSREFS
KEYWORD
nonn
AUTHOR
John W. Nicholson, Jan 01 2017
STATUS
approved