cp's OEIS Frontend

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.

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).

Original entry on oeis.org

0, 3, 7, 15, 36, 127, 337, 752, 1699, 3101, 11585, 38261, 108969, 314888, 1052616, 3214630, 7956587, 21949553, 99877773, 222744641, 597394252, 1932355206, 7250186214, 17146907276, 55160980937, 155891678119, 508666658004, 1427745660372
Offset: 1

Views

Author

Vladimir Pletser, Mar 16 2013

Keywords

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).

Crossrefs

Programs

  • Mathematica
    a[n_] := Round[LogIntegral[10^n] - LogIntegral[3]] - PrimePi[10^n]; Table[a[n], {n, 1, 14}]
  • PARI
    a(n)=round(eint1(-log(3))-eint1(-n*log(10)))-primepi(10^n) \\ Charles R Greathouse IV, May 03 2013

Formula

a(n) = A223166(n) - A006880(n).

Extensions

Terms a(25)-a(28) obtained using A006880. - Eduard Roure Perdices, Apr 14 2021