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 A098396 #12 Feb 07 2023 08:18:41 %S A098396 1,2,1,2,2,2,2,2,1,2,2,1,2,2,1,1,2,2,2,3,2,2,2,1,2,3,3,3,3,2,2,2,2,2, %T A098396 2,2,1,2,2,1,2,2,2,3,3,2,1,2,3,3,2,2,2,1,1,1,2,2,2,3,2,1,2,4,4,3,2,2, %U A098396 3,3,4,2,2,3,3,3,2,2,2,1,2,2,2,3,3,3,2,3,4,4,3,1,2,2,2,3,2,2,2,2,2,2,3,3,3 %N A098396 Number of primes that are not less than prime(n)-Log2(n) and not greater than prime(n)+Log2(n), where Log2=A000523. %H A098396 Robert Israel, <a href="/A098396/b098396.txt">Table of n, a(n) for n = 1..10000</a> %F A098396 a(n) = A000720(A098386(n)) - A000720(A098387(n)-1). %F A098396 A098398(n) <= a(n) <= A098397(n) <= A097935(n). %e A098396 a(10) = #{p prime: A098386(10) <= p <= A098387(10)} = %e A098396 = #{p prime: 26 <= p <= 32} = #{29,31} = 2. %p A098396 f:= proc(n) local p,d; %p A098396 p:= ithprime(n); d:= ilog2(n); %p A098396 numtheory:-pi(p+d)-numtheory:-pi(p-d-1) %p A098396 end proc: %p A098396 map(f, [$1..200]); # _Robert Israel_, Aug 13 2018 %t A098396 a[n_] := With[{p = Prime[n], d = BitLength[n]-1}, PrimePi[p+d] - PrimePi[p-d-1]]; %t A098396 Table[a[n], {n, 1, 200}] (* _Jean-François Alcover_, Feb 07 2023 *) %K A098396 nonn %O A098396 1,2 %A A098396 _Reinhard Zumkeller_, Sep 06 2004