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.
%I A280379 #15 Jan 26 2017 11:01:05 %S A280379 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, %T A280379 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, %U A280379 0,0,1,1,0,0,1,1,1,1,0 %N 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. %C A280379 a(n)=0 corresponds to the Ramanujan prime R_m = A104272(m) = A056171(k). %F A280379 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. %e A280379 For prime(30)=113, A056171(113) = 14, 107 is R_12 and 127 is R_13, so 14 -12 = 2 (first occurrence). %o A280379 (PARI) \\RR[x] is a list of Ramanujan primes, A104272. %o A280379 {plimit=1.1*10^4;n=s=0; %o A280379 forprime(p=2,plimit, %o A280379 s++; %o A280379 if(p==RR[n+1],n++); %o A280379 print1(s-primepi(floor(p/2))-n,", "); %o A280379 ) %o A280379 } %Y A280379 Cf. A056171, A104272. %K A280379 nonn %O A280379 1,30 %A A280379 _John W. Nicholson_, Jan 01 2017