TITLE: Evaluate: $\lim_{n\to\infty}\left({2\sqrt n}-\sum_{k=1}^n\frac1{\sqrt k}\right)$
QUESTION [25 upvotes]: How to find $\lim\limits_{n\to\infty}\left({2\sqrt n}-\sum\limits_{k=1}^n\frac1{\sqrt k}\right)$ ?
And generally does the limit of the integral of $f(x)$ minus the sum of $f(x)$ exist?
How to prove that and find the limit?

REPLY [2 votes]: A rather brute force approach, but by the Euler-Maclaurin formula,
$$2\sqrt n-\sum_{k=1}^n\frac1{\sqrt k}=-\zeta(1/2)-\frac1{2\sqrt n}+R_n$$
where
$$|R_n|\le\frac1{8n^{3/2}}$$
And so, as $n\to\infty$, we get
$$\lim_{n\to\infty}\left(2\sqrt n-\sum_{k=1}^n\frac1{\sqrt k}\right)=-\zeta(1/2)$$