This seems like something that should be in discussed in the literature, but I can't find anything. Here $\pi(x)$ is the prime counting function and $\psi(x)$ is the usual sum of the Von Mangoldt function.

Are there non-trivial estimates for the quantity $\int_{1}^{N} |\psi(x) - x| dx$? The prime number theorem asserts $|\pi(x)- x/ln(x)| = o(x/ln(x))$, or, equivalently, $|\psi(x) - x| = o(x)$. Using this we trivially have the estimate $o(N^2)$ for the expression above (which we can make a bit more quantitative using quantitative forms of the pnt) however it seems plausible that this could be improved since we are asking for average case instead of worst case information about $|\psi(x) - x|$. In fact since we know that $\psi(x) - x$ oscillates to the extremes $\pm \sqrt{x}/ln(x)$ infinitely often, it seems plausible that it might spend a fair amount of time away from these extremes.

  • 1
    $\begingroup$ Mark, if you enclose your code in dollar signs, your texing efforts will be rewarded with nicely rendered math :) $\endgroup$ Nov 26, 2009 at 22:02

1 Answer 1


The mean square version

$\int_X^{2X} |\psi(x) - x|^2dx$

is more natural than the one you want. This is discussed on page 423 of Montgomery and Vaughan's book, on the assumption of the Riemann Hypothesis. Briefly, you can use the truncated explicit formula for $\psi(x)$ and multiply out and integrate. It does not look like one gets a great bound only by the zero-free region of Korobov and Vinogradov. The cancellation that you want seems to be there, but depends on the behavior of the differences $\gamma_1 - \gamma_2$ where $\gamma_1$,$\gamma_2$ are imaginary parts of nontrivial zeros of the Riemann zeta function, so it is hard to get at.

If you have a bound for the above integral, you can get one for your integral by Cauchy-Schwarz, of course. I think your integral is hopeless to attack directly; it will either have to come from a pointwise bound as you tried above, or a bound on some even power, or perhaps some combination.

The range from X to 2X is a convenience so that things do not change enormously over the range; you can bound the whole integral from 1 to X by adding integrals over dyadic ranges.

  • $\begingroup$ Thanks. I would be interested to know if this can be improved (without the Riemann Hypothesis) to $\int_X^{2X} |\psi(x) - x|^2dx << X^{3-\delta}$ for $\delta>0$. $\endgroup$
    – Mark Lewko
    Nov 27, 2009 at 0:05
  • 7
    $\begingroup$ Well, from the explicit formula for $\psi(x)$, this is equivalent to having no zeroes with real part greater than $1 - \delta$, so the answer depends on what you mean by "without the Riemann hypothesis". Basically, a single exceptional zero $\rho$ (and its conjugates, of course) is already close to the worst-case scenario, and in this scenario there is no distinction between average-case and worst-case behaviour of $\psi(x)$. $\endgroup$
    – Terry Tao
    Nov 29, 2009 at 22:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .