Order of Divisor Count Function

Theorem
For all $x \ge 1$:


 * $\displaystyle \sum_{n \le x} d \left({n}\right) = x \log x + \left({2 \gamma-1}\right) x + O \left({\sqrt x}\right)$

where $\gamma$ is Euler's constant and $d \left({n}\right)$ is the divisor function.