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 A306863 #37 Aug 02 2024 18:23:36 %S A306863 2,2,1,0,2,0,1,2,1,0,1,0,2,0,1,2,0,1,1,0,1,0,0,1,2,2,1,0,0,0,0,0,1,1, %T A306863 0,2,0,0,0,2,0,1,0,1,1,0,1,0,2,0,0,0,2,2,0,0,0,0,1,0,0,0,0,1,2,1,0,2, %U A306863 0,0,0,1,0,1,0,1,0,2,0,1,2,0,0,0,1,0,0 %N A306863 a(n) is the number of primes between the n-th and (n+1)-st odd composite numbers. %H A306863 Harvey P. Dale, <a href="/A306863/b306863.txt">Table of n, a(n) for n = 1..1000</a> %e A306863 The first few odd composite numbers are 9, 15, 21, 25, 27, 33, 35, 39, 45, 49. Between 9 and 15, there are two primes (11 and 13); between 15 and 21 there are also two primes (17 and 19); between 21 and 25 there is only one prime (23), etc. %t A306863 Differences@ PrimePi@ Complement[Range[3, #, 2], Prime@ Range[2, PrimePi@ #]] &@ 300 (* _Michael De Vlieger_, Apr 21 2019 *) %t A306863 Differences[PrimePi/@Select[Range[3,301,2],CompositeQ]] (* _Harvey P. Dale_, Sep 16 2023 *) %o A306863 (PARI) { b=9; for(i=6, 150, if(isprime(2*i-1)==0, print1(primepi(2*i-1)-primepi(b), ", "); b=2*i-1)) } %o A306863 (Python) %o A306863 from itertools import count %o A306863 from sympy import primepi, isprime %o A306863 def A306863(n): %o A306863 if n == 1: return 2 %o A306863 m, k = n, primepi(n) + n + (n>>1) %o A306863 while m != k: %o A306863 m, k = k, primepi(k) + n + (k>>1) %o A306863 return next(c for c in count(0) if not isprime(m+(c<<1)+2)) # _Chai Wah Wu_, Aug 02 2024 %Y A306863 Cf. A071904, A000040, A001223 (differences between primes), A164510, A001097. %K A306863 nonn %O A306863 1,1 %A A306863 _Zhandos Mambetaliyev_, Mar 14 2019