Summation over k of Floor of x plus k over y

Theorem
Let $x, y \in \R$ such that $y > 0$.

Then:


 * $\ds \sum_{0 \mathop \le k \mathop < y} \floor {x + \dfrac k y} = \floor {x y + \floor {x + 1} \paren {\ceiling y - y} }$

Proof
When $x$ increases by $1$, both sides increase by $\ceiling y$.

So we can assume $0 \le x < 1$.

When $x = 0$, both sides are equal to $0$.

When $x$ increases past $1 - \dfrac k y$ for $0 \le k < y$, both sides increase by $1$.

Hence the result.