<s>[INST] Sum of integer parts of different numbers I have the sum of all these integer parts of different numbers
$$
\lfloor 1\rfloor + \lfloor \sqrt{2} \rfloor + \lfloor \sqrt{3} \rfloor  + \dots + \lfloor \sqrt{15} \rfloor 
$$
I don't have any idea to solve this exercise.
 [/INST] More generally, for nonnegative integer $n$, $\lfloor \sqrt{x} \rfloor = n$ if
$n \le \sqrt{x} < n+1$, i.e. $n^2 \le x < (n+1)^2$. Since $(n+1)^2 - n^2 = 2n+1$,
there are $2n+1$ integers $x$ for which this is true.  Thus
$$\lfloor \sqrt{1} \rfloor + \lfloor \sqrt{2}\rfloor + \ldots + \lfloor \sqrt{(n+1)^2 - 1}\rfloor = \sum_{j=1}^n (2 j + 1) j = \dfrac{n(n+1)(4n+5)}{6}$$ 
</s>