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.

A057794 (Integer nearest R(10^n)) - pi(10^n), where pi(x) is the number of primes <= x, R(x) = Sum_{ k>=1 } (mu(k)/k * li(x^(1/k))) and li(x) is the Cauchy principal value of the integral from 0 to x of dt/log(t).

This page as a plain text file.
%I A057794 #33 Feb 16 2025 08:32:43
%S A057794 1,1,0,-2,-5,29,88,97,-79,-1828,-2318,-1476,-5773,-19200,73218,327052,
%T A057794 -598255,-3501366,23884333,-4891825,-86432204,-127132665,1033299853,
%U A057794 -1658989719,-1834784714,-17149335456,-17535487934,-174760519827
%N A057794 (Integer nearest R(10^n)) - pi(10^n), where pi(x) is the number of primes <= x, R(x) = Sum_{ k>=1 } (mu(k)/k * li(x^(1/k))) and li(x) is the Cauchy principal value of the integral from 0 to x of dt/log(t).
%C A057794 This is Riemann's remarkable approximation for the number of primes <= x.
%C A057794 Equivalently, R(x) is given by the Gram series, 1 + sum of log(x)^k/(k*k!*zeta(k+1)) for k = 1 to infinity. This series converges more quickly.
%D A057794 John H. Conway and R. K. Guy, "The Book of Numbers," Copernicus, an imprint of Springer-Verlag, NY, 1996, page 146.
%D A057794 M. du Sautoy, The Music of the Primes, Fourth Estate / HarperCollins, 2003; see p. 90.
%H A057794 Anatolii A. Karatsuba and Ekatherina A. Karatsuba, <a href="https://web.archive.org/web/20171109081433/http://www.phy.bg.ac.rs/~mphys6/proceedings5/14-KaratsubaKaratsuba.ps">The "problem of remainders" in theoretical physics: "physical zeta" function</a>, 6th Mathematical Physics Meeting: Summer School and Conference on Modern Mathematical Physics, 14-23 September 2010, Belgrade, Serbia. [From Internet Archive Wayback Machine]
%H A057794 Tomás Oliveira e Silva, <a href="http://sweet.ua.pt/tos/primes.html">Tables of values of pi(x) and of pi2(x)</a>
%H A057794 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeCountingFunction.html">Prime Counting Function.</a>
%H A057794 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RiemannPrimeNumberFormula.html">Riemann Prime Number Formula.</a>
%H A057794 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/GramSeries.html">Gram Series.</a>
%t A057794 R[x_] := Sum[N[LogIntegral[x^(1/k)]*MoebiusMu[k]/k, 36], {k, 1, 1000}]; a[n_] := Abs[Round[R[10^n]-PrimePi[10^n]]]
%t A057794 gram[x_] := 1+Sum[N[Log[x]^k/(k*k!*Zeta[k+1]), 100], {k, 1, 1000}]; a[n_] := Abs[Round[gram[10^n]-PrimePi[10^n]]]
%t A057794 (* From version 7 on : *) a[n_] := Round[RiemannR[10^n]-PrimePi[10^n]] (* _Jean-François Alcover_, Sep 17 2012 *)
%o A057794 (PARI) A057794=vector(#A006880,i,round(1+suminf(k=1, log(10^i)^k/(k*k!*zeta(k+1)))-A006880[i])) \\ - _M. F. Hasler_, Feb 26 2008
%Y A057794 Cf. A006880, A057752.
%K A057794 sign
%O A057794 1,4
%A A057794 _Robert G. Wilson v_, Nov 04 2000
%E A057794 First term corrected by _David Baugh_, Nov 15 2002
%E A057794 Signs added by _M. F. Hasler_, Feb 26 2008
%E A057794 The value of a(23) is not known at present, I believe. - _N. J. A. Sloane_, Mar 17 2008
%E A057794 Last two terms a(23) and a(24), with Pi(10^n) for n=23 and 24 from A006880, from _Vladimir Pletser_, Feb 27 2013
%E A057794 Terms a(25)-a(28) obtained using A006880. - _Eduard Roure Perdices_, Apr 13 2021