Find $\sum_{i=1}^{200}f(i)$ 
$$f(x)=\left\{ \begin{array}{ c l } \left[\frac{1}{\{\sqrt{x}\}}\right] & \quad \textrm{if $x≠k^2$} \\ 0 & \quad \textrm{otherwise} \end{array} \right.$$ Where $x,k\in \mathbb{N}$ and [.] represents greatest integer function and {.} represents frictional part. Find $$\sum_{i=1}^{200}f(i)$$

The only method in my mind is to solve is by calculating each term value and adding.
Are there any methods one can solve this in notebook.
 A: Let $x=k^2+r$ For $0<r<2k+1$. Then $f(x)=\lfloor \frac{1}{\sqrt{k^2+r}-k} \rfloor=\lfloor \frac{\sqrt{k^2+r}+k}{r}\rfloor$. Note that $\frac{2k}{r}<\frac{\sqrt{k^2+r}+k}{r}<\frac{2k+1}{r}$. Because $r\ge 1$, $f(x)$ is then either $\lfloor \frac{2k}{r}\rfloor$, or $\lfloor \frac{2k}{r}\rfloor+1$. When there is no integer between the two bounds on $f(x)$, $f(x)=\lfloor \frac{2k}{r}\rfloor$. When there is an integer, it’s questionable. So the question is then when is there such an integer. The answer is never because $r$ Is an integer and if there is an integer between $2k/r$ And $(2k+1)/r$, it’s of the form $(2k+\epsilon)/r$, but the numerator is not an integer, which is impossible. Therefore, we can conclude that $f(x)=\lfloor \frac{2k}{r}\rfloor$. For a fixed $k$ we iterate from $r=1$ To $r=2k$. It then becomes
$$f(197)+f(198)+f(199)+f(200)+\sum_{k=1}^{13}\sum_{r=1}^{2k}\lfloor \frac{2k}{r}\rfloor$$
Now you can probably finish. The first four terms are easy to do, then you can simplify $\sum_{k=1}^x \lfloor \frac{x}{k}\rfloor$ With double counting (it becomes a sum of divisors).
