Sum of floor function of general term While doing some solution to get a general term for some series I encountered at the end with this.
$S(n,i) = \left(\dfrac{n^2+n-2i}{n} - \lfloor\dfrac{n^2+n-2i}{2n}\rfloor \right) \left(\lfloor\dfrac{n^2+n-2i}{2n}\rfloor +1 \right)$ 
, where $i> \dfrac{n}{2}$. How can I get the general term from this summation by geting rid of the floor function. 

Assuming $n$ is even and $i<\frac{3}{2}n$,
$$\lfloor\frac{n^2+n-2i}{2n}\rfloor = \lfloor\frac{n^2-(n+2i)}{2n}\rfloor = \frac{n}{2}-\lfloor\frac{n+2i}{2n}\rfloor = \frac{n}{2}-1$$
So 
$$S(n,i) = (\frac{n^2+n-2i}{n}-\frac{n}{2}+1)*(\frac{n}{2}) = (\frac{n}{2}-2\frac{i}{n}+2)*(\frac{n}{2})$$
So 
$$S(n,i) = (\frac{n}{2})^2+n-i$$
