2
$\begingroup$

If $f(n)$ be the integer closest to $\sqrt{n}.$ then value of $\displaystyle \sum^{2016}_{k=1}\frac{1}{f(k)}$

could some help me with ths, thanks

3 Answers 3

4

If $j$ is a positive integer, the integers $n$ for which the closest integer to $\sqrt{n}$ is $j$ are those who verify $j-1/2<\sqrt{n}

Best regards,

Tig la Pomme

5

Hint $$k-\frac{1}{2} \leq \sqrt{n} < k+\frac{1}{2} \Leftrightarrow k^2-k+\frac{1}{4} \leq n

There are $2k$ integers for which $f(n)=\frac{1}{k}$.

5

Taking a cue from sequence A000194 in the OEIS, we have $$S = \sum_{k=1 }^{2016} \frac{1}{f (k)}$$ $$ = \frac {2}{1} + \frac {4}{2} + \frac {6}{3} + \cdots + \frac {2 \lfloor \sqrt {2016} \rfloor}{\lfloor \sqrt {2016} \rfloor} + \frac {36}{\lceil \sqrt {2016} \rceil}\,\,(\text{ why? })$$ $$=2+2+2\cdots +2 +\frac {36}{45} $$ where $2$ is added $44$ times giving an answer of $\boxed {88.8} $.

Hope it helps.