The Gram series is an approximation to the prime counting function given by
(1)
|
where is the Riemann zeta function (Hardy 1999, p. 24). This approximation is 10 times better than for but has been proven to be worse infinitely often by Littlewood (Ingham 1990).
The Gram series is equivalent to the Riemann prime counting function (Hardy 1999, pp. 24-25)
(2)
|
where is the logarithmic integral and is the Möbius function (Hardy 1999, pp. 16 and 23; Borwein et al. 2000), but 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.
A related series due to Ramanujan is
(3)
| |||
(4)
| |||
(5)
| |||
(6)
|
(Berndt 1994, p. 124; Hardy 1999, p. 23), where is a Bernoulli number. The integral analog, also found by Ramanujan, is
(7)
|
(Berndt 1994, p. 129; Hardy 1999, p. 23).