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 A339085 #8 Nov 26 2020 23:06:40 %S A339085 0,2,3,2,3,2,3,3,3,3,3,3,4,4,4,4,5,4,4,4,4,4,5,5,5,4,4,4,4,4,5,6,6,5, %T A339085 5,6,6,6,6,6,7,6,6,6,6,6,7,7,7,7,7,7,7,7,8,8,8,8,8,7,8,8,8,8,8,8,8,8, %U A339085 8,9,9,9,9,8,8,9,9,9,10,10,10,10,10,10,10 %N A339085 Number of primes p with n - pi(n) < p <= n + pi(n), where pi(n) is the number of primes <= n. %C A339085 a(n) >= 2 if n >= 2 and a(n) >= 3 if n is a prime >= 3 (see the paper by Ya-Ping Lu attached in the links). %H A339085 Ya-Ping Lu, <a href="/A337788/a337788.pdf">Lower Bounds for the Number of Primes in Some Integer Intervals</a> %F A339085 a(n) = pi(n + pi(n)) - pi(n - pi(n)). %F A339085 a(n) = A000720(n + A000720(n)) - A000720(n - A000720(n)). %F A339085 a(n) = A000720(A095117(n)) - A000720(A062298(n)). %F A339085 a(n) = A337788(n) + A338521(n) + isprime(n), where isprime(n) = 1 (if n is a prime) or 0 (if n is not a prime). %t A339085 Table[PrimePi[n+PrimePi[n]]-PrimePi[n-PrimePi[n]],{n,85}] (* _Stefano Spezia_, Nov 24 2020 *) %o A339085 (Python) %o A339085 from sympy import primepi %o A339085 for n in range(1, 101): %o A339085 m = primepi(n) %o A339085 print (primepi(n + m) - primepi(n - m)) %Y A339085 Cf. A000720, A095117, A062298, A337788, A338521. %K A339085 nonn %O A339085 1,2 %A A339085 _Ya-Ping Lu_, Nov 23 2020