Prove that $\sum_{k=1} ^ n k^{-1} = \ln(n) + O(1)$ I would like to prove that $\sum_{k=1} ^ n k^{-1} = \ln(n) + O(1)$. That is, I would like to show that there is some natural number $N$ large enough so that $n \ge N$ implies:
$$|\sum_{k=1}^n k^{-1} - \ln(n) | < M,$$
where $M$ is a positive constant independent of $n$. I think the idea behind the argument must be easy, but I am somehow missing it. I do see that $\sum_{k=1}^n k^{-1}$ can be taken as a sort of approximation, using areas of rectangles, to $\int_1^n \frac{1}{x}dx = \ln(n)$. So maybe the argument uses the integral comparison test? But, anyway, I'm still fumbling with how to proceed.
Hints or solutions are greatly appreciated.

For each $k\geq 1$, define $$g_k=\frac 1 k-\int_{k}^{k+1}\frac{dx}x$$
Observe that since $x^{-1}$ is decreasing, $g_k>0$ for each $k$. Moreover, for each $k$ $$g_k<\frac 1k -\frac 1{k+1}$$
Thus, for each $n$
$$0<\sum_{k=1}^n g_k< 1-\frac 1{n+1}$$
Since each $g_k$ is positive, $$G_n=\sum_{k=1}^n g_k$$ is monotone increasing, moreover $$\lim\left( 1-\frac 1{n+1}\right)=1$$ which means $G_n$ is bounded above by $1$. By the monotone convergence theorem, $\lim G_n$ exists. But 
$$G_n=\sum\limits_{k = 1}^n {{g_k}}  = {H_n} - \log \left( {n + 1} \right)$$
Thus ${H_n} - \log \left( {n + 1} \right)\to \gamma $ a constant, $0<\gamma <1$. 
NOTE Observe that the above means, since $$\log \left( {1 + {1 \over n}} \right)\to 0$$ that $${H_n} - \log n \to \gamma $$ as well.
