# Equation that is equivalent to the summation presented?

The series that is represented is below the thick horizontal line. My question is: Is the equation

$$\sum_{i=1}^ni(-1)^{i-1}=-\left\lfloor\frac{n}2\right\rfloor+n(n\bmod 2)$$

correct for the series below?

$$1-2+3-4+5-6+7-8\ldots\pm(n-1)\mp n$$

(mod is for modulus, being remainder division. Didn't know if that was clear.)

 Please check that I copied the series and formula correctly. – Brian M. Scott Oct 2 '12 at 2:13 Yes, the expression on the right is correct. – André Nicolas Oct 2 '12 at 2:17 Thank you very much, Andre. And yes. The formula and series are both copied correctly. Thank you for editing it in for me, Brian M. Scott! – Jessica Hope Oct 2 '12 at 2:22 Should I interpret $n(n \bmod 2)$ as $n$ if $n \equiv 1 \bmod 2$ and $0$ if $n \equiv 0 \bmod 2$? If so, then $n\left(n - 2\left\lfloor\frac{n}{2}\right\rfloor\right)$ gives the same result. – Michael Albanese Oct 2 '12 at 2:28