OFFSET
1,2
COMMENTS
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.
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).
LINKS
Eric Weisstein's World of Mathematics, Prime Counting Function
Eric Weisstein's World of Mathematics, Logarithmic Integral
MATHEMATICA
a[n_] := Round[LogIntegral[10^n] - LogIntegral[3]] - PrimePi[10^n]; Table[a[n], {n, 1, 14}]
PROG
(PARI) a(n)=round(eint1(-log(3))-eint1(-n*log(10)))-primepi(10^n) \\ Charles R Greathouse IV, May 03 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Pletser, Mar 16 2013
EXTENSIONS
Terms a(25)-a(28) obtained using A006880. - Eduard Roure Perdices, Apr 14 2021
STATUS
approved