made with Mathematica technology MathWorld

Riemann Prime Counting Function
DOWNLOAD Mathematica Notebook Contribute to this entry
RiemannPrimeCountingFunction

Riemann defined the function f(x) by

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

(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 2003, p. 298), or Pi(x) (Havil 2003, p. 189). Note that this is not an infinite series since the terms become zero (Derbyshire 2004, p. 299) starting at the nth term, where n=|_lgx_| and |_x_| is the floor function. 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, ... (Sloane's A096624 and A096625). As can be seen, when x is a prime, f(x) jumps by 1; when it is the square 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.

Amazingly, the prime counting function pi(x) is related to f(x) by the Möbius transform

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

where mu(n) is the Möbius function (Riesel 1994, p. 49; Havil 2003, p. 196; Derbyshire 2004, p. 302). More amazingly still, f(x) is connected with the Riemann zeta function zeta(s) by

 1/sln[zeta(s)]=int_0^inftyf(x)x^(-s-1)dx
(6)

(Derbyshire 2004, p. 309).

RiemannFunctionF

Riemann (1859) proposed that

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

where li(x) is the logarithmic integral and the sum is over all nontrivial zeros rho of the Riemann zeta function zeta(z) (Mathews 1892, 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). Actually, since the sum of roots is only conditionally convergent, it must be summed in order of increasing I[rho] even when pairing terms rho with their "twins" 1-rho, so

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

(Edwards 2001, pp. 30 and 33).

This formula was subsequently proved by Mangoldt (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)

(Sloane's A096623; Derbyshire 2003, p. 329).

f(x) is also given by

 f(x)=lim_(t->infty)1/(2pii)int_(2-iT)^(2+iT)(x^s)/slnzeta(s)ds,
(10)

where zeta(z) is the Riemann zeta function. This function satisfies

 (lnzeta(s))/s=int_1^inftyJ(x)x^(-s-1)dx
(11)

(Riesel 1994, p. 47; Edwards 2001, p. 23), and (10) and (11) form a Mellin transform pair.

RiemannR

Riemann also considered the function

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

sometimes also denoted Ri(x) (Borwein et al. 2000), obtained by replacing f(x^(1/n)) in the Riemann function with the logarithmic integral li(x^(1/n)), where zeta(z) is the Riemann zeta function and mu(n) is the Möbius function (Hardy 1999, pp. 16 and 23; Borwein et al. 2000; Havil 2003, p. 198). 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 (Sloane's 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) (Sloane's 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 will be implemented in a future version of Mathematica as RiemannR.

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. Riemann conjectured that R(n)=pi(n) (Knuth 1998, p. 382), but this was disproved by Littlewood in 1914 (Hardy and Littlewood 1918).

GramSeriesRiemannComparison

This series is identical to the Gram series

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

where zeta(z) is the Riemann zeta function (Hardy 1999, pp. 24-25), but 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 Mathematica'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

Riemann's function is related to the prime counting function by

 pi(x)=R(x)-sum_(rho)R(x^rho),
(14)

where the sum is over all complex (nontrivial) zeros rho of zeta(s) (Ribenboim 1996), i.e., those in the critical strip so 0<R[rho]<1, interpreted to mean

 sum_(rho)R(x^rho)=lim_(t->infty)sum_(|I(rho)|<t)R(x^rho).
(15)

However, no proof of the equality of (14) appears to exist in the literature (Borwein et al. 2000).

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

REFERENCES:

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.

Berndt, B. C. Ramanujan's Notebooks, Part IV. New York: Springer-Verlag, 1994.

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. Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work, 3rd ed. New York: Chelsea, 1999.

Hardy, G. H. and Littlewood, J. E. Acta Math. 41, 119-196, 1918.

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.

Ingham, A. E. The Distribution of Prime Numbers. London: 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, 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.

Riemann, B. "Über die Darstellbarkeit einer Function durch eine trigonometrische Reihe." In Gesammelte math. Abhandlungen. New York: Dover, pp. 227-264, 1957.

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.

Riesel, H. "The Riemann Prime Number Formula." Prime Numbers and Computer Methods for Factorization, 2nd ed. Boston, MA: Birkhäuser, pp. 50-52, 1994.

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.




CITE THIS AS:

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

The Wolfram Demonstrations Project Browse Topics View Latest
JUST RELEASED: Wolfram Mathematica 7