Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #21 Apr 14 2021 19:09:05
%S 0,3,7,15,36,127,337,752,1699,3101,11585,38261,108969,314888,1052616,
%T 3214630,7956587,21949553,99877773,222744641,597394252,1932355206,
%U 7250186214,17146907276,55160980937,155891678119,508666658004,1427745660372
%N Difference between nearest integer to (Li(10^n)-Li(3)) and pi(10^n), where Li(10^n)-Li(3) = integral(3.. 10^n, dt/log(t)) (A223166) and pi(10^n) = number of primes <= 10^n (A006880).
%C As Li(3)= 2.163588..., A057752(n)-a(n) = 2, except for n =3, 6, 10, 11, 15, 20 where A057752(n)-a(n)= 3.
%C This sequence yields an even better average relative difference than Gauss's approximation (A106313), i.e., Average(a(n)/pi(10^n)) = 7.4969...*10^-3 for 1<=n<=24, compared to Average(A057752(n)/pi(10^n)) = 3.2486...*10^-2 and Average(A106313(n)/pi(10^n)) = 2.0116...*10^-2, showing that, when using the logarithmic integral, Li(10^n)-Li(3) (A223166) gives a better approximation to pi(10^n) than Li(10^n)-Li(2) (A190802) and than Li(10^n) (A057754).
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimeCountingFunction.html">Prime Counting Function</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/LogarithmicIntegral.html">Logarithmic Integral</a>
%F a(n) = A223166(n) - A006880(n).
%t a[n_] := Round[LogIntegral[10^n] - LogIntegral[3]] - PrimePi[10^n]; Table[a[n], {n, 1, 14}]
%o (PARI) a(n)=round(eint1(-log(3))-eint1(-n*log(10)))-primepi(10^n) \\ _Charles R Greathouse IV_, May 03 2013
%Y Cf. A057754, A057752, A006880, A190802, A106313.
%K nonn
%O 1,2
%A _Vladimir Pletser_, Mar 16 2013
%E Terms a(25)-a(28) obtained using A006880. - _Eduard Roure Perdices_, Apr 14 2021