# $\sum^n_{j=0} (-1)^{j-1}j$

I'm trying to find a formula for the alternating series $S_n= \sum^n_{j=0} (-1)^{j-1}j$ in terms of n but I'm blocked. By trial and error I know that it's equal to $\frac{ (-1)^{n+1}(2n+1)}{4} + \frac{1}{4}$ but I can't find a way from there. Anyone have a hint what to do please?

-

Way 1: split into two cases, $n$ even and $n$ odd. In the first case,

$$(1-2)+\cdots((2m-1)-2m)=\underbrace{(-1)+\cdots+(-1)}_m=-m,$$

where $n=2m$. Otherwise if $n=2m+1$ is odd,

$$\sum=(-m)+(2m+1)=m+1.$$

Glue these two together however one desires.

Way 2: an approach through "generating functions" would be to take the geometric sum formula,

$$1+x+\cdots+x^n=\frac{x^{n+1}-1}{x-1},$$

take the derivative of both sides, then plug in $x=-1$.

-
Thanks just edited the question... Didn't realize it was so easy !!! – A. Napster May 11 '12 at 12:06

Elegant solutions of the problem have been given by anon. We start instead at the stage at which by trial and error you reached the conjecture that $\sum_{j=0}^n (-1)^{j-1}j=\frac{(-1)^{n+1}(2n+1)}{4}+\frac{1}{4}$. The point we want to make is that after the conjecture is made, it can be proved mechanically by induction. We provide two versions of the induction argument, one that has the traditional shape, and a second which is less traditional.

Traditional induction: Suppose that the conjecture is correct for $n=k$. We show that it is correct for $n=k+1$. So we are supposing that $$\sum_{j=0}^k (-1)^{j-1}j=\frac{(-1)^{k+1}(2k+1)}{4}+\frac{1}{4}.\tag{1}$$ We have $$\sum_{j=0}^{k+1} (-1)^{j-1}j=\left(\sum_{j=0}^k (-1)^{j-1}j\right) + (-1)^k(k+1).\tag{2}$$ By the induction hypothesis $(1)$, the right-hand side of $(2)$ is equal to $$\frac{(-1)^{k+1}(2k+1)}{4}+\frac{1}{4}+ (-1)^k(k+1).\tag{3}$$ Note that $(-1)^k=(-1)^{k+2}$ and $(-1)^{k+1}=-(-1)^{k+2}$. It follows that expression $(3)$ is equal to $$(-1)^{k+2}\left(k+1 -\frac{2k+1}{4}\right)+\frac{1}{4}.$$ This simplifies to $(-1)^{k+2}\frac{2(k+1)+1}{4}+\frac{1}{4}$, which is exactly the assertion that the conjecture is correct for $n=k+1$.

Another way: The following is a better, but still mechanical, way to verify your conjecture. Let $(a_n)$ be the sequence whose $n$-th term is $\sum_{j=0}^n (-1)^{j-1}j$. Let $(b_n)$ be the sequence whose $n$-th term is $\frac{(-1)^{n+1}(2n+1)}{4}+\frac{1}{4}$. We want to show that the two sequences are the same. It is easy to verify that $a_1=b_1$. Note that the sequence $(a_n)$ satisfies the recurrence $$a_{n+1}=a_n+ (-1)^n(n+1).$$ If we can show that the sequence $(b_n)$ satisfies the same recurrence, we will be finished. So we want to show that $b_{n+1}-b_n=(-1)^n(n+1)$. Calculate. $$b_{n+1}-b_n=\left( \frac{(-1)^{n+2}(2n+3)}{4}+\frac{1}{4} \right) -\left( \frac{(-1)^{n+1}(2n+1)}{4}+\frac{1}{4} \right).$$
The rest is routine algebra, using the fact that $(-1)^{n+2}=(-1)^n$ and $(-1)^{n+1}=-(-1)^n$.

-