# Find $\sum_{k=1}^nk\lfloor k\varphi\rfloor$, where $\varphi$ is golden ratio

I've got this far, which is nothing really. Assuming $S(n)=\sum_{k=1}^n\lfloor k\varphi\rfloor$, for which we have a recursive formula (see here: Solve summation $\sum_{i=1}^n \lfloor e\cdot i \rfloor$), we can write out sum as $$1\lfloor\varphi\rfloor+2\lfloor2\varphi\rfloor+\ldots+n\lfloor n\varphi\rfloor=$$ $$=S(n)+(S(n)-S(1))+(S(n)-S(2))+\ldots+(S(n)-S(n-1))=$$ $$=nS(n)-\sum_{k=1}^{n-1}S(k).$$ Computationally, this is obviously very slow. Anything faster? Thanks.

• It may be of interest to note that $S(n)$ as presented is sequence A054347 and has a reference therein that may lead to further information. – Leucippus Nov 22 '17 at 3:39