Arithmetic Average of Second Chebyshev Function

Theorem
Let $x \ge 1$ be a real number.

Then:
 * $\ds \sum_{n \le x} \map \psi {x/n} = x \ln x - x + \map \OO {\map \ln {x + 1} }$

where:
 * $\OO$ is big-O notation
 * $\psi$ is the Second Chebyshev function.

Proof
We have, by the definition of the Second Chebyshev function:


 * $\ds \sum_{n \le x} \map \psi {x/n} = \sum_{n \le x} \sum_{m \le x/n} \map \Lambda m$

where $\Lambda$ is the Von Mangoldt function.

We can show that:


 * $\ds \sum_{n \le x} \sum_{m \le x/n} \map \Lambda m = \sum_{t \le x} \sum_{m \divides t} \map \Lambda m$

Then, from Sum Over Divisors of von Mangoldt is Logarithm, we have:


 * $\ds \sum_{t \le x} \sum_{m \divides t} \map \Lambda m = \sum_{t \le x} \ln t$

With a view to bound this sum, note that:


 * $\ds \sum_{t \le x} \ln t = \ln 1 + \sum_{2 \le t \le x} \ln t = \sum_{2 \le t \le x} \ln t$

We have:


 * $\ds \sum_{2 \le t \le x} \ln t = \sum_{2 \le t \le x} \paren {\int_{t - 1}^t \ln t \rd u}$

From Logarithm is Strictly Increasing, we have:


 * $\ln u \le \ln t \le \map \ln {u + 1}$

for $t - 1 \le u \le t$, so:


 * $\ds \sum_{2 \le t \le x} \paren {\int_{t - 1}^t \ln u \rd u} \le \sum_{2 \le t \le x} \paren {\int_{t - 1}^t \ln t \rd u} \le \sum_{2 \le t \le x} \paren {\int_{t - 1}^t \map \ln {u + 1} \rd u}$

Now, from Sum of Integrals on Adjacent Intervals for Integrable Functions, we have:


 * $\ds \sum_{2 \le t \le x} \paren {\int_{t - 1}^t \map \ln {u + 1} \rd u} = \int_1^{\floor x} \map \ln {u + 1} \rd u$

and:


 * $\ds \sum_{2 \le t \le x} \paren {\int_{t - 1}^t \ln u \rd u} = \int_1^{\floor x} \ln u \rd u$

We can compute:

and:


 * $\ds \int_1^{\floor x} \ln u \rd u = \floor x \ln \floor x - \floor x$

Since $x - 1 < \floor x \le x$, and $1 - 2 \ln 2 < 0$, we have:


 * $\paren {\floor x + 1} \map \ln {\floor x + 1} - \floor x - 2 \ln 2 + 1 \le \paren {x + 1} \map \ln {x + 1} - x$

and:


 * $\paren {x - 1} \map \ln {x - 1} - \paren {x - 1} \le \floor x \ln \floor x - \floor x$

from Logarithm is Strictly Increasing.

We have therefore obtained that:


 * $\ds \paren {x - 1} \map \ln {x - 1} - \paren {x - 1} \le \sum_{n \le x} \map \psi {x/n} \le \paren {x + 1} \map \ln {x + 1} - x$

We will use this inequality to show that:


 * $\ds \sum_{n \le x} \map \psi {x/n} - \paren {x \ln x - x} = \map \OO {\map \ln {x + 1} }$

We have:


 * $\ds \paren {x - 1} \map \ln {x - 1} - x \ln x \le \sum_{n \le x} \map \psi {x/n} - \paren {x \ln x - x} \le \paren {x + 1} \map \ln {x + 1} - x \ln x$

We will show that for sufficiently large $x$ we have:


 * $\paren {x + 1} \map \ln {x + 1} - x \ln x \le 2 \map \ln {x + 1}$

and:


 * $-2 \map \ln {x + 1} \le \paren {x - 1} \map \ln {x - 1} - x \ln x$

at which point we have the claim.

Define a function $f : \hointr 1 \infty \to \R$ by:


 * $\map f x = \paren {x + 1} \map \ln {x + 1} - x \ln x - 2 \map \ln {x + 1}$

for each $x \in \hointr 1 \infty$.

Note that:


 * $\map f 1 = 2 \ln 2 - 1 \ln 1 - 2 \ln 2 = 0$

So it suffices to show that $f$ is decreasing for $x \ge 1$, then we will have $\map f x < 0$ for $x \ge 1$.

Note that $f$ is differentiable and:

We can now see that $\map {f'} x < 0$ for $x \ge 1$.

So, from Real Function with Negative Derivative is Decreasing:


 * $f$ is decreasing.

So, for $x \ge 1$, we have:


 * $\paren {x + 1} \map \ln {x + 1} - x \ln x - 2 \map \ln {x + 1} \le \map f 1 = 0$

That is:


 * $\paren {x + 1} \map \ln {x + 1} - x \ln x \le 2 \map \ln {x + 1}$

For the other inequality, define a function $g : \openint 1 \infty \to \R$ by:


 * $\map g x = \paren {x - 1} \map \ln {x - 1} - x \ln x + 2 \map \ln {x + 1}$

Again $g$ is differentiable with:

We can see that $\map {g'} x \ge 0$ for $x \ge 3$.

So from Real Function with Positive Derivative is Increasing:


 * $g$ is increasing.

So for $x \ge 3$ we have:

so for $x \ge 3$ we have:

Putting these two inequalities together, for $x \ge 3$ we have:


 * $\ds -2 \map \ln {x + 1} \le \sum_{n \le x} \map \psi {x/n} - \paren {x \ln x - x} \le 2 \map \ln {x + 1}$

so, by the definition of big-O notation:


 * $\ds \sum_{n \le x} \map \psi {x/n} - \paren {x \ln x - x} = \map \OO {\map \ln {x + 1} }$

so:


 * $\ds \sum_{n \le x} \map \psi {x/n} = x \ln x - x + \map \OO {\map \ln {x + 1} }$