I have the summation: $$F(n) := \sum_{i=1}^n \lfloor i\sqrt2 \rfloor $$ (i.e. $F(5) = 19$)
I would like to simplify the expression of $F$ and get rid of the sum. I saw the proof that $\sum_{i=1}^n i = \frac{n(n+1)}{2}$ via $$S(n) = 1 + 2 + \ldots + n-1 + n$$ $$S(n) = n + n-1 + \ldots + 2 + 1$$ $$2S(n) = (n+1) + (n+1) + \ldots + (n+1) + (n+1)$$ $$S(n) = \frac{n(n+1)}{2}$$
And I tried to copy it for my own use, $$F(n) = \lfloor\sqrt2\rfloor + \lfloor2\sqrt2\rfloor + ... + \lfloor(n-1)\sqrt2\rfloor + \lfloor n\sqrt2\rfloor$$
$$F(n) = \lfloor n\sqrt2\rfloor + \lfloor (n-1)\sqrt2\rfloor + ... + \lfloor 2\sqrt2\rfloor + \lfloor\sqrt2\rfloor$$
$$2F(n) = (\lfloor n\sqrt2\rfloor + \lfloor \sqrt2\rfloor) + (\lfloor n\sqrt2\rfloor + \lfloor \sqrt2\rfloor) + ... + (\lfloor n\sqrt2\rfloor + \lfloor \sqrt2\rfloor) + (\lfloor n\sqrt2\rfloor + \lfloor \sqrt2\rfloor)$$
$$F(n) = n\frac{\lfloor n\sqrt2\rfloor + \lfloor \sqrt2\rfloor}{2}$$
However, $F(5)$ gives me $20$, not the correct $19$.
My only thought was that it's an issue with separate $floor$ functions interacting with each other, but I am not sure.
Can anyone explain to me where I went wrong, and/or point me in the correct direction for finding this equation?