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.

A057752 Difference between nearest integer to Li(10^n) and pi(10^n), where Li(x) = integral of log(x) and pi(10^n) = number of primes <= 10^n (A006880).

Original entry on oeis.org

2, 5, 10, 17, 38, 130, 339, 754, 1701, 3104, 11588, 38263, 108971, 314890, 1052619, 3214632, 7956589, 21949555, 99877775, 222744644, 597394254, 1932355208, 7250186216, 17146907278, 55160980939, 155891678121, 508666658006, 1427745660374, 4551193622464
Offset: 1

Views

Author

Robert G. Wilson v, Oct 30 2000

Keywords

Comments

On his prime pages C. K. Caldwell remarks: "However in 1914 Littlewood proved that pi(x)-Li(x) assumes both positive and negative values infinitely often". - Frank Ellermann, May 31 2003

References

  • John H. Conway and R. K. Guy, The Book of Numbers, Copernicus, an imprint of Springer-Verlag, NY, 1995, page 146.
  • Marcus du Sautoy, The Music of the Primes, Fourth Estate / HarperCollins, 2003; see table on p. 90.

Crossrefs

Programs

  • Mathematica
    Table[Round[LogIntegral[10^n] - PrimePi[10^n]], {n, 1, 13}]
  • PARI
    A057752=vector(#A006880,i,round(-eint1(-log(10^i))-A006880[i])) \\ M. F. Hasler, Feb 26 2008
    
  • Python
    from sympy import N, li, primepi, floor
    def round(n):
        return int(floor(n+0.5))
    def A057752(n):
        return round(N(li(10**n),10*n)) - primepi(10**n) # Chai Wah Wu, Apr 30 2018

Extensions

More terms from Frank Ellermann, May 31 2003
The value of a(23) is not known at present, I believe. - N. J. A. Sloane, Mar 17 2008
Name corrected and extended for last two terms a(23) and a(24), with Pi(10^n) for n=23 and 24 from A006880, by Vladimir Pletser, Mar 10 2013
a(25)-a(27) added, using data from A006880, by Chai Wah Wu, Apr 30 2018
a(28) added, using data from A006880, by Eduard Roure Perdices, Apr 14 2021
a(29) added, using data from A006880, by Reza K Ghazi, May 10 2022