Integral $\int_{0}^{n^{2}} \lfloor \sqrt{t} \rfloor \rm dt $
$$\int_{0}^{n^2}\lfloor \sqrt{t}\rfloor dt=\sum_{k=1}^n\int_{(k-1)^2}^{k^2}\lfloor \sqrt{t}\rfloor dt\\=\sum_{k=1}^n\int_{(k-1)^2}^{k^2} (k-1)dt=\sum_{k=1}^{n}(k-1)(k^2-(k-1)^2)=\sum_{k=1}^n (2k^2-3k+1)\\=\frac{n(n+1)(2n+1)}{3}-3\frac{n(n+1)}{2}+n$$
That's the right starting point, now just write that out in summation notation. So we have your integral is equal to $$\sum _{k=1}^{n-1}((k+1)^2-k^2)k$$ Simplifying, we get $$\sum _{k=1}^{n-1}(2k+1)k=2\sum _{k=1}^{n-1}k^2+\sum_{k=1}^{n-1}k=2\cdot \frac {(n-1)(n)(2n-1)}{6}+\frac {(n-1)(n)}{2} $$ Factoring, we get$$(n-1)(n)\left( \frac {2n-1}{3}+ \frac{ 1}{ 2} \right)$$
If your observation is right, then
$$\begin{align} \sum_{k=1}^{n-1}((k+1)^2-k^2)k&=\sum_{k=1}^{n-1}(k^2+2k+1-k^2)k\\ &=\sum_{k=1}^{n-1}(2k^2+k)\\ &=2\frac{n({n-1})(2n-1)}{6}+\frac{n(n-1)}{2}\\ &=n(n-1)\left(\frac{2n-1}{3}+\frac12\right) \end{align}$$