login
Floor(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).
4

%I #30 Apr 17 2021 03:44:43

%S 0,0,0,-3,-5,29,88,96,-79,-1828,-2319,-1476,-5774,-19201,73217,327052,

%T -598255,-3501366,23884333,-4891825,-86432205,-127132665,1033299853,

%U -1658989720,-1834784715,-17149335456,-17535487935,-174760519828

%N Floor(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 In Riemann's approximation for the number of primes <= 10^n, taking Floor(R(10^n)), i.e. the greatest integer <= R(10^n), instead of the nearest integer to R(10^n), i.e. Round(R(10^n)) (see A057794), provides a better approximation to pi(10^n) for small values of n and some other values of n, i.e. Abs(a(n)) = Abs(A057794(n))-1 for n = 1, 2, 8, 15. However, the approximation is worse by one unit, i.e. Abs(a(n)) = Abs(A057794(n))+1 for n = 4, 11, 13, 14, 21, 24, 25, 27, 28. The approximation is the same for the other 15 values of n <= 28. However, it yields a better average relative difference, i.e. Average(Abs(a(n))/pi(10^n)) = 1.24535…x10^-4 for 1 <= n <= 28, compared to Average(Abs(A057794(n))/pi(10^n)) = 1.04526…x10^-2. - Corrected and extended by _Eduard Roure Perdices_, Apr 16 2021

%D John H. Conway and R. K. Guy, The Book of Numbers, Copernicus, an imprint of Springer-Verlag, NY, 1996, page 146.

%H Michel Planat and Patrick Solé, <a href="http://arxiv.org/abs/1410.1083">Improving Riemann prime counting</a>, arXiv:1410.1083 [math.NT], 2014.

%t R[x_] := Sum[N[LogIntegral[x^(1/k)]*MoebiusMu[k]/k, 36], {k, 1, 1000}]; a[n_] := Floor[R[10^n]-PrimePi[10^n]]

%t a[n_] := Floor[RiemannR[10^n] - PrimePi[10^n]] (* _Eduard Roure Perdices_, Apr 16 2021 *)

%Y Cf. A006880, A057752, A057794.

%K sign

%O 1,4

%A _Vladimir Pletser_, Mar 09 2013

%E a(17) corrected, a(25)-a(28) obtained using A006880. - _Eduard Roure Perdices_, Apr 16 2021