Riemann Prime Counting Function
Riemann defined the function
by
|
(1)
| |||
|
(2)
| |||
|
(3)
| |||
|
(4)
|
(Hardy 1999, p. 30; Borwein et al. 2000; Havil 2003, pp. 189-191 and 196-197; Derbyshire 2004, p. 299), sometimes denoted
,
(Edwards 2001,
pp. 22 and 33; Derbyshire 2004, p. 298), or
(Havil 2003,
p. 189). Note that this is not an infinite series since the terms become zero
(Derbyshire 2004, p. 299) starting at the
th term, where
and
is the floor function. For
, 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
is a prime,
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
is related to
by the Möbius
transform
|
(5)
|
where
is the Möbius
function (Riesel 1994, p. 49; Havil 2003, p. 196; Derbyshire 2004,
p. 302). More amazingly still,
is connected
with the Riemann zeta function
by
|
(6)
|
(Riesel 1994, p. 47; Edwards 2001, p. 23; Derbyshire 2004, p. 309).
is also given by
|
(7)
|
where
is the Riemann
zeta function, and (6) and (7) form a
Mellin transform pair.
Riemann (1859) proposed that
|
(8)
|
where
is the logarithmic
integral and the sum is over all nontrivial zeros
of the Riemann
zeta function
(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). Actually, since the sum of roots is only
conditionally convergent, it must be summed in order of increasing
even when
pairing terms
with their "twins"
, so
|
(9)
|
(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
, but since there are no primes
less than 2, the only values of interest are for
. Since it
is monotonic decreasing, the maximum therefore occurs at
, which has value
|
(10)
|
(OEIS A096623; Derbyshire 2004, p. 329).
Riemann also considered the function
|
(11)
|
sometimes also denoted
(Borwein et
al. 2000), obtained by replacing
in the
Riemann function with the logarithmic integral
, where
is the Riemann zeta function and
is the Möbius function (Hardy 1999, pp. 16 and
23; Borwein et al. 2000; Havil 2003, p. 198).
is plotted
above, including on a semilogarithmic scale (bottom two plots), which illustrate
the fact that
has a series
of zeros near the origin. These occur at
for
(OEIS A143530),
15300.7, 21381.5, 25461.7, 32711.9, 40219.6, 50689.8, 62979.8, 78890.2, 98357.8,
..., corresponding to
(OEIS A143531),
,
,
,
,
,
,
,
,
,
....
The quantity
is plotted
above.
This function is implemented in the Wolfram Language as RiemannR[x].
Ramanujan independently derived the formula for
, but nonrigorously
(Berndt 1994, p. 123; Hardy 1999, p. 23). The following table compares
and
for small
. Riemann conjectured that
(Knuth
1998, p. 382), but this was disproved by Littlewood in 1914 (Hardy and Littlewood
1918).
The Riemann prime counting function is identical to the Gram series
|
(12)
|
where
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
where
is computed using the Wolfram
Language's built-in NSum command (black) and approximated using the
first
(blue),
(green),
(yellow),
(orange), and
(red) points.
In the table,
denotes the
nearest integer function. Note that the
values given by Hardy (1999, p. 26) for
are incorrect.
| Sloane | A057793 | A057794 |
| 1 | 5 | 1 |
| 2 | 26 | 1 |
| 3 | 168 | 0 |
| 4 | 1227 | |
| 5 | 9587 | |
| 6 | 78527 | 29 |
| 7 | 664667 | 88 |
| 8 | 5761552 | 97 |
| 9 | 50847455 | |
| 10 | 455050683 | |
| 11 | 4118052495 | |
| 12 | 37607910542 |
Riemann's function is related to the prime counting function by
|
(13)
|
where the sum is over all complex (nontrivial) zeros
of
(Ribenboim
1996), i.e., those in the critical strip so
, interpreted to mean
|
(14)
|
However, no proof of the equality of (13) appears to exist in the literature (Borwein et al. 2000).
prime counting function


