TOPICS
Search

Riemann Prime Counting Function


RiemannPrimeCountingFunction

The Riemann prime counting function R(x) approximates the prime counting function (Knuth 1998, p. 382). For real numbers x>=1, the auxiliary function f(x) associated with Riemann's formula (Riemann 1859) is defined in the right-continuous convention by

f(x)=sum_(p^nu<=x; p prime)1/nu
(1)
=sum_(n=1)^(|_lgx_|)(pi(x^(1/n)))/n
(2)
=pi(x)+1/2pi(x^(1/2))+1/3pi(x^(1/3))+...
(3)

(Hardy 1999, p. 30; Borwein et al. 2000; Havil 2003, pp. 189-191 and 196-197; Derbyshire 2004, p. 299), sometimes denoted pi^*(x), J(x) (Edwards 2001, pp. 22 and 33; Derbyshire 2004, p. 298), or Pi(x) (Havil 2003, p. 189). Here p is a prime and nu and n are positive integers. The terms become zero for n>|_lgx_|, where |_x_| is the floor function and lgx is the base-2 logarithm. For x=1, 2, ..., the first few values are 0, 1, 2, 5/2, 7/2, 7/2, 9/2, 29/6, 16/3, 16/3, ... (OEIS A096624 and A096625). As can be seen, when x is a prime, f(x) jumps by 1; when it is the square number of a prime, it jumps by 1/2; when it is a cube of a prime, it jumps by 1/3; and so on (Derbyshire 2004, pp. 300-301), as illustrated above. Riemann's midpoint convention instead uses f_0(x)=1/2[f(x-0)+f(x+0)] for x>1 (Riemann 1859). Thus f_0(x)=f(x) away from prime powers.

For x>=1, the prime counting function pi(x) is related to f(x) by Möbius inversion

 pi(x)=sum_(n=1)^infty(mu(n))/nf(x^(1/n)),
(4)

where mu(n) is the Möbius function (Riesel 1994, p. 49; Havil 2003, p. 196; Derbyshire 2004, p. 302). Extending f(x) by 0 for 0<x<1, its connection with the Riemann zeta function is

 (ln[zeta(s)])/s=int_0^inftyf(x)x^(-s-1)dx
(5)

for Re[s]>1, with the analytic branch of lnzeta(s) tending to 0 as Re[s]->infty (Riesel 1994, p. 47; Edwards 2001, p. 23; Derbyshire 2004, p. 309). Its inverse for real x>1 is

 f_0(x)=lim_(T->infty)1/(2pii)int_(2-iT)^(2+iT)(x^s)/slnzeta(s)ds.
(6)

The transform identity and its inverse form a Mellin transform pair.

RiemannFunctionF

Riemann (1859) proposed that

 f_0(x)=li(x)-sum_(rho)li(x^rho)-ln2+int_x^infty(dt)/(t(t^2-1)lnt)
(7)

for real x>1, where li(x) is the logarithmic integral and the sum is over all nontrivial zeros rho of the Riemann zeta function zeta(z) (Mathews 1961, Ch. 10; Landau 1974, Ch. 19; Ingham 1990, Ch. 4; Hardy 1999, p. 40; Borwein et al. 2000; Edwards 2001, pp. 33-34; Havil 2003, p. 196; Derbyshire 2004, p. 328). Zeros are counted with multiplicity, and the sum is interpreted as the limit of sums with |Im[rho]|<T as T->infty. Here li(x^rho) means Ei(rholnx), where Ei is the exponential integral. Pairing rho with 1-rho gives

 sum_(rho)li(x^rho)=sum_(Im[rho]>0)[li(x^rho)+li(x^(1-rho))]
(8)

with pairs ordered by increasing positive Im[rho] (Edwards 2001, pp. 30 and 33).

This formula was subsequently proved by Mangoldt (1895; Riesel 1994, p. 47; Edwards 2001, pp. 48 and 62-65). The integral on the right-hand side converges only for x>1, but since there are no primes less than 2, the only values of interest are for x>=2. Since it is monotonic decreasing, the maximum therefore occurs at x=2, which has value

 int_2^infty(dt)/(tlnt(t^2-1))=0.14001010114328692668...
(9)

(OEIS A096623; Derbyshire 2004, p. 329).

RiemannR

For x>1, Riemann (1859) also considered the function

 R(x)=sum_(n=1)^infty(mu(n))/nli(x^(1/n)),
(10)

sometimes also denoted Ri(x) (Borwein et al. 2000), obtained by replacing f(x^(1/n)) in the Möbius inversion formula with the logarithmic integral li(x^(1/n)), where mu(n) is the Möbius function (Hardy 1999, pp. 16 and 23; Borwein et al. 2000; Havil 2003, p. 198). The Gram series defines its continuation to x>0, with R(1)=1. R(x) is plotted above, including on a semilogarithmic scale (bottom two plots), which illustrate the fact that R(x) has a series of zeros near the origin. These occur at 10^(-x) for x=14827.7 (OEIS A143530), 15300.7, 21381.5, 25461.7, 32711.9, 40219.6, 50689.8, 62979.8, 78890.2, 98357.8, ..., corresponding to x=1.829×10^(-14828) (OEIS A143531), 2.040×10^(-15301), 3.289×10^(-21382), 2.001×10^(-25462), 1.374×10^(-32712), 2.378×10^(-40220), 1.420×10^(-50690), 1.619×10^(-62980), 6.835×10^(-78891), 1.588×10^(-98358), ....

RiemannPrimeNumberFormula

The quantity R(x)-pi(x) is plotted above.

This function is implemented in the Wolfram Language as RiemannR[x].

Ramanujan independently derived the formula for R(n), but nonrigorously (Berndt 1994, p. 123; Hardy 1999, p. 23). The following table compares pi(10^n) and R(10^n) for small n. Littlewood proved in 1914 that pi(x)-li(x) changes sign infinitely often (Hardy and Littlewood 1918).

GramSeriesRiemannComparison

For real x>0, the Riemann prime counting function is given by the Gram series

 G(x)=1+sum_(k=1)^infty((lnx)^k)/(kk!zeta(k+1)),
(11)

where zeta(z) is the Riemann zeta function (Hardy 1999, pp. 24-25), but the Gram series is much more tractable for numeric computations. For example, the plots above show the difference G(x)-R(x) where R(x) is computed using the Wolfram Language's built-in NSum command (black) and approximated using the first 10^1 (blue), 10^2 (green), 10^3 (yellow), 10^4 (orange), and 10^5 (red) points.

In the table, [x] denotes the nearest integer function. Note that the values given by Hardy (1999, p. 26) for x=10^9 are incorrect.

nnint(R(10^n))nint(R(10^n)-pi(10^n))
SloaneA057793A057794
151
2261
31680
41227-2
59587-5
67852729
766466788
8576155297
950847455-79
10455050683-1828
114118052495-2318
1237607910542-1476

Borwein et al. (2000, p. 249) discuss the approximation for real x>1

 pi(x) approx R(x)-sum_(rho)R(x^rho),
(12)

where the sum is over all nontrivial zeros rho of zeta(s), counted with multiplicity, and interpreted to mean

 sum_(rho)R(x^rho)=lim_(T->infty)sum_(|Im(rho)|<T)R(x^rho).
(13)

In this sum, R(x^rho) is evaluated by the Gram series with ln(x^rho) interpreted as rholnx. Borwein et al. (2000, p. 249) report that the relation had been called exact (Ribenboim 1996), but they could not locate a proof of that equality.


See also

Gram Series, Prime Counting Function, Prime Number Theorem, Riemann Function, Riemann Hypothesis, Soldner's Constant

Explore with Wolfram|Alpha

References

Berndt, B. C. Ramanujan's Notebooks, Part IV. New York: Springer-Verlag, 1994.Borwein, J. M.; Bradley, D. M.; and Crandall, R. E. "Computational Strategies for the Riemann Zeta Function." J. Comput. Appl. Math. 121, 247-296, 2000. https://doi.org/10.1016/S0377-0427(00)00336-8.Derbyshire, J. Prime Obsession: Bernhard Riemann and the Greatest Unsolved Problem in Mathematics. New York: Penguin, 2004.Edwards, H. M. Riemann's Zeta Function. New York: Dover, 2001.Hardy, G. H. "The Series R(x)." §2.3 in Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work, 3rd ed. New York: Chelsea, 1999.Hardy, G. H. and Littlewood, J. E. "Contributions to the Theory of the Riemann Zeta-Function and the Theory of the Distribution of Primes." Acta Math. 41, 119-196, 1918.Havil, J. Gamma: Exploring Euler's Constant. Princeton, NJ: Princeton University Press, p. 42, 2003.Ingham, A. E. The Distribution of Prime Numbers. London, England: Cambridge University Press, p. 83, 1990.Knuth, D. E. The Art of Computer Programming, Vol. 2: Seminumerical Algorithms, 3rd ed. Reading, MA: Addison-Wesley, 1998.Landau, E. Handbuch der Lehre von der Verteilung der Primzahlen, 3rd ed. New York: Chelsea, 1974.Mangoldt, H. von. "Zu Riemann's Abhandlung 'Ueber die Anzahl der Primzahlen unter einer gegebenen Grösse.' " J. reine angew. Math. 114, 255-305, 1895.Mathews, G. B. Ch. 10 in Theory of Numbers. New York: Chelsea, 1961.Ribenboim, P. The New Book of Prime Number Records. New York: Springer-Verlag, pp. 224-225, 1996.Riemann, B. "Über die Darstellbarkeit einer Function durch eine trigonometrische Reihe." Reprinted in Gesammelte math. Abhandlungen. New York: Dover, pp. 227-264, 1957.Riemann, G. F. B. "Über die Anzahl der Primzahlen unter einer gegebenen Grösse." Monatsber. Königl. Preuss. Akad. Wiss. Berlin, 671-680, Nov. 1859. Reprinted in Das Kontinuum und Andere Monographen (Ed. H. Weyl). New York: Chelsea, 1972. Also reprinted in English translation in Edwards, H. M. Appendix. Riemann's Zeta Function. New York: Dover, pp. 299-305, 2001.Riesel, H. "The Riemann Prime Number Formula." Prime Numbers and Computer Methods for Factorization, 2nd ed. Boston, MA: Birkhäuser, pp. 50-52, 1994.Riesel, H. and Göhl, G. "Some Calculations Related to Riemann's Prime Number Formula." Math. Comput. 24, 969-983, 1970.Sloane, N. J. A. Sequences A057793, A057794, A096623, A096624, A096625, A143530, A143531 in "The On-Line Encyclopedia of Integer Sequences."Wagon, S. Mathematica in Action. New York: W. H. Freeman, pp. 28-29 and 362-372, 1991.

Referenced on Wolfram|Alpha

Riemann Prime Counting Function

Cite this as:

Weisstein, Eric W. "Riemann Prime Counting Function." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/RiemannPrimeCountingFunction.html

Subject classifications