# Showing that the analytic definition of the Euler Constant is $O(n^{-1})$ [duplicate]

I'm stumped by this one exercise. The question is to "Prove that there exists a positive constant $\gamma$ such that $$\sum_{k=1}^n k^{-1} - \log{n} = \gamma + O(n^{-1})$$ by comparing the sum to a Riemann sum for $\int_1^n x^{-1} dx$."

However, I can't seem to figure out how to show that the approximation is $O(n^{-1})$. By taking the obvious (the left- and right-hand) Riemann sums for the integral, I can get the bound $0 \le \sum_{k=1}^n k^{-1} - \log{n} \le 1$, which is good enough to show that $\gamma = \lim_{n\to \infty} \sum_{k=1}^n k^{-1} - \log{n}$ exists (I think, if I also use the monotonicity of the harmonic numbers and $\log$), but not that the error is $O(n^{-1})$. I think that I need to use the definition of $\gamma$ to get the approximation, but I don't see how I can do any more with the Riemann sum.