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 A223853 #41 Sep 08 2022 08:46:04 %S A223853 1,1,2,1,2,2,2,1,3,4,1,7,1,13,10,4,25,-5,49,17,38,82,103,-55,245,290, %T A223853 105,621,-107,1219,1196,-274,1749,5329,2881,2451,6836,2910,15905, %U A223853 28044,-10652,55758,18068,129994,-95925,52787,443983,253331,151395,740898,-352415 %N A223853 a(n) = ceiling(li(2*2^n) - li(2^n)) - (pi(2*2^n) - pi(2^n)) with li(x) the logarithmic integral and pi(x) the prime counting function. %C A223853 This is the difference between the estimate for the number of primes in power of two intervals determined by the li approximation, and the actual number of primes in the power of two interval. The MAGMA program gives the ceiling of the difference between the li estimate at the end points of the interval and the actual number of primes in the interval (A036378). %C A223853 H. J. J. te Riele (1987) using methods developed by Lehman (1966) showed that between 6.62*10^370 and 6.69*10^370 there are more than 10^180 consecutive integers where pi(x) > li(x). It is worth noting that this falls entirely within the power of two interval starting at 2^1231, and while the condition "li underestimates the number of primes in an interval" is not sufficient to imply that pi(x) > li(x), for example in (2^18, 2^19) li(x) underestimates by 5 but li(x) > pi(x) at every point in the interval, it does seem to be necessary for this to occur, assuming runs of consecutive values where pi(x) > li(x) do not cross a power of two. %H A223853 Brad Clardy, <a href="/A223853/b223853.txt">Table of n, a(n) for n = 1..74</a> %H A223853 R. S. Lehman, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa11/aa11132.pdf">On the difference pi(x) - li(x)</a>, Acta Arithmetica XI (1966), p. 397-410 %H A223853 H. J. J. te Riele, <a href="https://doi.org/10.1090/S0025-5718-1987-0866118-6">On the sign of the difference pi(x) - li(x)</a>, Math. Comp. 48 (1987), p.323-328 %F A223853 a(n) = A223900(n) - A036378(n). %t A223853 pi = Table[PrimePi[2^n], {n, 1, 30}]; %t A223853 li = Table[LogIntegral[2^n], {n, 1, 30}]; %t A223853 Ceiling[Rest@li - Most@li] - (Rest@pi - Most@pi) (* _Peter Luschny_, Oct 14 2017 *) %o A223853 (Magma) %o A223853 1; %o A223853 for i := 2 to 29 do %o A223853 x := 2^i; %o A223853 y := 2^(i+1); %o A223853 delta_li := Ceiling(LogIntegral(y) - LogIntegral(x)); %o A223853 delta_pi := #PrimesInInterval(x, y); %o A223853 delta_li - delta_pi; %o A223853 end for; %Y A223853 Cf. A000720, A036378, A052435, A223900. %K A223853 sign %O A223853 1,3 %A A223853 _Brad Clardy_, Mar 28 2013