Showing $\left\lfloor \sum_{k=1}^{10000} {1 \over \sqrt k}\right\rfloor = 198$

summation

Some time ago, I was given a homework, which, among other things, asked to demonstrate the following equality:
$$\left\lfloor \sum_{k=1}^{10000} {1 \over \sqrt k}\right\rfloor = 198$$
I've tried a few things but nothing got me too far; I haven't found anything on the Internet about this, either (at least not satisfactory enough).

I've also wondered if/how it'd be possible to find the result for any positive integer $n$, i.e. to find $q$ such that
$$\left\lfloor \sum_{k=1}^n {1 \over \sqrt k}\right\rfloor = q$$

EDIT: Thanks a lot for all your responses. This problem (at least in my case) is for 9th grade, so no integration allowed (or calculus in general), although I'm not sure a proof of that level is possible; your responses are good enough for me, anyways.

Best Answer

In Apostol's Number Theory textbook it is shown using Euler's summation formula that for all $0<s<1$, $$ \sum_{k=1}^n\frac{1}{k^s}=\frac{n^{1-s}-1}{1-s}+1-s\int_1^n\frac{t-\lfloor t\rfloor}{t^{s+1}}\ dt\qquad (1). $$ Observe that for all $n>1$, $$ 0< \int_1^n\frac{t-\lfloor t\rfloor}{t^{s+1}}\ dt\leq \int_1^{\infty}\frac{1}{t^{s+1}}\ dt=\frac{1}{s}. $$ Using these bounds in $(1)$ implies that $$ 0\leq\sum_{k=1}^n\frac{1}{k^s}-\frac{n^{1-s}-1}{1-s}<1. $$ Consequently, it follows that $$ \left\lfloor\sum_{k=1}^n\frac{1}{k^s}\right\rfloor=\frac{n^{1-s}-1}{1-s} $$ whenever the right side is an integer. In particular, when $n=10^4$ and $s=\tfrac12$ the right side evaluates to the integer $198$, and this answers your question.

To answer your more general question, observe that our integer condition when $s=\tfrac12$ requires that $2(\sqrt{n}-1)$ be an integer, or equivalently, that $n$ is a perfect square. Thus, $$ q=2(\sqrt{n}-1), $$ whenever $n$ is a perfect square. For non-square $n$, our bounds imply that rounding $2(\sqrt{n}-1)$ will get you to within $1$ of the correct answer.

Related Question