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 A223167 #22 Feb 16 2025 08:33:19 %S A223167 0,3,7,15,36,127,337,752,1699,3101,11585,38261,108969,314888,1052616, %T A223167 3214630,7956587,21949553,99877773,222744641,597394252,1932355206, %U A223167 7250186214,17146907276,55160980937,155891678119,508666658004,1427745660372 %N A223167 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 A223167 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 A223167 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 A223167 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeCountingFunction.html">Prime Counting Function</a> %H A223167 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LogarithmicIntegral.html">Logarithmic Integral</a> %F A223167 a(n) = A223166(n) - A006880(n). %t A223167 a[n_] := Round[LogIntegral[10^n] - LogIntegral[3]] - PrimePi[10^n]; Table[a[n], {n, 1, 14}] %o A223167 (PARI) a(n)=round(eint1(-log(3))-eint1(-n*log(10)))-primepi(10^n) \\ _Charles R Greathouse IV_, May 03 2013 %Y A223167 Cf. A057754, A057752, A006880, A190802, A106313. %K A223167 nonn %O A223167 1,2 %A A223167 _Vladimir Pletser_, Mar 16 2013 %E A223167 Terms a(25)-a(28) obtained using A006880. - _Eduard Roure Perdices_, Apr 14 2021