# Finding sum for function with floor-function

I am trying to find a formula to calculate the following sum: $$\sum_{x=0}^n (2ax - {1 \over 2}a^2 - {1 \over 2} a)$$

where

$$a = \left\lfloor {x \over \phi^2} \right\rfloor$$

and

$$\phi = {1 + \sqrt 5 \over 2}$$

-