We have seen that \(\sum_{n \leq x} d(n) = x \log x + O(x)\text{.}\) Here we will seek an improvement: replacing the \(O(x)\) term with a concrete linear function, specifically \((2 \gamma - 1)x + O(\sqrt{x})\) where \(\gamma\) is the Euler-Mascheroni constant.
The difference is increasing as a function of \(b\text{,}\) because if we think of the sum as a left-hand rule Riemann sum, then each time \(b\) increases, we are adding a “triangle” to the difference.
Since the difference is increasing and bounded, it converges to a limit. This limit is called the Euler-Mascheroni constant, denoted \(\gamma\) because of connections with the gamma function. Numerically,
\begin{equation}
\sum_{n \leq x} d(n) = \sum_{dk \leq x} 1 = \#\{(d,k) \colon d k \leq x \} \text{,}\tag{5.2.2}
\end{equation}
which means the sum we are interested in is the number of lattice points on or under the hyperbola \(dk = x\text{.}\)
Remark5.2.1.
Using more common variable names, we might consider the hyperbola \(xy = c\) (say), or in other words \(y = \frac{c}{x}\text{.}\) If we substitute \(x = (x' - y')/\sqrt{2}\text{,}\)\(y = (x' + y')/\sqrt{2}\text{,}\) then the hyperbola is transformed to \(x'^2 - y'^2 = 2c\text{,}\) a more common form of a hyperbola. And this substitution is simply a rotation by \(45\) degrees.
Our previous estimate came from counting the lattice points on each column with horizontal coordinate \(d\text{,}\) for each \(d \leq x\text{:}\) there are \(\left\lfloor \frac{x}{d} \right\rfloor\) lattice points in that column, which is approximately equal to \(x/d\) with \(O(1)\) error; then summing \(x/d\) is approximated by an integral.
We can try to improve this idea by breaking the area under the hyperbola into three (overlapping) regions: the region \(d \leq \sqrt{x}\text{,}\) the region \(k \leq \sqrt{x}\text{,}\) and the region \(d,k \leq \sqrt{x}\text{.}\) The first region is the “left part” of the area, consisting of the “arm” pointing upwards plus the square under that arm. The second region is the “right part”, and the third region is the square between the two arms (with the two arms attached to its right and top sides).
The number of lattice points in the square is simply
Likewise the number of lattice points in the right part is by symmetry the same.
So, the total number of lattice points is
\begin{equation}
2(x \log \sqrt{x} + \gamma x + O(\sqrt{x})) - (x + O(\sqrt{x}))
= x \log x + (2\gamma - 1) x + O(\sqrt{x})\text{.}\tag{5.2.4}
\end{equation}
Remark5.2.2.
Write
\begin{equation*}
\sum_{n \leq x} d(n) = x \log x + (2 \gamma - 1)x + \Delta(x)\text{.}
\end{equation*}
We have seen that \(\Delta(x) = O(x^{1/2})\text{.}\) It has been shown that \(\Delta(x) = O(x^{1/3})\text{;}\) on the other hand, \(\Delta(x)\) is not \(O(x^{1/4})\text{.}\) It is an open problem to find the infimum of \(p\) such that \(\Delta(x)\) is \(O(x^p)\text{.}\)