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 A338521 #8 Nov 23 2020 01:46:10 %S A338521 0,0,1,1,1,1,1,2,1,1,1,1,1,2,2,2,2,2,2,3,2,2,2,3,3,2,2,1,1,2,2,3,3,2, %T A338521 2,2,2,3,3,3,3,3,3,4,3,3,3,4,4,4,4,3,3,4,4,4,3,3,3,3,3,4,4,4,3,3,3,4, %U A338521 4,4,4,5,5,5,5,5,5,5,5,6,5,5,5,5,5,5,5 %N A338521 The number of primes between n-primepi(n) and n. %C A338521 There is at least one prime number between n-primepi(n) and n, or a(n) >= 1, for n >= 3 (see Corollary 3 in the paper by Ya_Ping Lu attached in the links). %H A338521 Ya-Ping Lu, <a href="/A337788/a337788.pdf">Lower Bounds for the Number of Primes in Some Integer Intervals</a> %F A338521 a(n) = primepi(n - 1) - primepi(n - primepi(n)). %F A338521 a(n) = A000720(n - 1) - A000720(n - A000720(n)). %F A338521 a(n) = A000720(n -1) - A000720(A062298(n)). %t A338521 Array[Subtract @@ Map[PrimePi, {#1 - 1, #1 - #2}] & @@ {#, PrimePi[#]} &, 105] (* _Michael De Vlieger_, Nov 05 2020 *) %o A338521 (Python) %o A338521 from sympy import primepi %o A338521 for n in range(1, 101): %o A338521 pi = primepi(n) %o A338521 pi_1 = primepi(n - 1) %o A338521 a = pi_1 - primepi(n - pi) %o A338521 print(a) %o A338521 (PARI) a(n) = primepi(n - 1) - primepi(n - primepi(n)); \\ _Michel Marcus_, Nov 01 2020 %Y A338521 Cf. A000720, A062298, A337788. %K A338521 nonn %O A338521 1,8 %A A338521 _Ya-Ping Lu_, Nov 01 2020