# Closed-form for Floor Sum 2

Does a closed form exist for the following sum?

$\sum_{k=0}^{n}\lfloor\sqrt{k}\rfloor\lfloor\sqrt{k+P}\rfloor$

where $P$ is a positive odd integer. Would a closed-form be possible if the factorization of $P$ is known?

• You have $n$ and $N$ here - are they meant to be the same or different values? – Steven Stadnicki Aug 28 '17 at 19:06
• They are different, $N$ in this case is a positive odd integer. – Ruan Sunkel Aug 28 '17 at 19:07
• I would suggest not using such similar variable names in general; confusion is almost inevitable. In any case, a closed form seems highly unlikely particularly given the 'freeform' nature of $N$ - transitions in the sum can happen at essentially any point and tracking them looks highly difficult. – Steven Stadnicki Aug 28 '17 at 19:10
• The problem is, however, interesting for $N=n$. – Mark Fischler Aug 28 '17 at 19:13
• Good advice, I will update the variable names – Ruan Sunkel Aug 28 '17 at 19:15