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.
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, 105, 621, -107, 1219, 1196, -274, 1749, 5329, 2881, 2451, 6836, 2910, 15905, 28044, -10652, 55758, 18068, 129994, -95925, 52787, 443983, 253331, 151395, 740898, -352415
Offset: 1
Keywords
Links
- Brad Clardy, Table of n, a(n) for n = 1..74
- R. S. Lehman, On the difference pi(x) - li(x), Acta Arithmetica XI (1966), p. 397-410
- H. J. J. te Riele, On the sign of the difference pi(x) - li(x), Math. Comp. 48 (1987), p.323-328
Programs
-
Magma
1; for i := 2 to 29 do x := 2^i; y := 2^(i+1); delta_li := Ceiling(LogIntegral(y) - LogIntegral(x)); delta_pi := #PrimesInInterval(x, y); delta_li - delta_pi; end for;
-
Mathematica
pi = Table[PrimePi[2^n], {n, 1, 30}]; li = Table[LogIntegral[2^n], {n, 1, 30}]; Ceiling[Rest@li - Most@li] - (Rest@pi - Most@pi) (* Peter Luschny, Oct 14 2017 *)
Comments