# Sum of the sum of the sum of $4i(-1)^i$

I am attempting to evaluate the sum $$\sum_{i=0}^{x-1} \Biggl(4+4\sum_{j=3}^{i+2} j(-1)^j\Biggr)$$ I'm not that experienced at summations, so I can go as far as $$4x+4\sum_{i=0}^{x-1} \sum_{j=3}^{i+2} j(-1)^j$$ Before I get stuck.

Using a WolframAlpha widget, I get $$((-1)^{x-1} + 8){(x-1)} + 3 (-1)^{x-1} + 10$$

My question is, how would this be evaluated on paper?

Edit: I wrote the summation incorrectly.

Edit 2: The Wolfram Alpha version of the summation may be wrong.

• Are you sure you have written the question correctly? The index $j$ doesn't appear anywhere in the sum? – Vizag Apr 19 at 18:50
• Thanks! I just fixed it. – Jonah Apr 19 at 18:50
• For the record, Mathematica informs me that the sum is $4$ if $x$ is odd and $-2x$ if $x$ is even, so you've done something wrong with the widget. – eyeballfrog Apr 20 at 1:43
• @eyeballfrog You're right! I don't think the widget behaves properly with double summations, so thanks for bringing that to my attention! – Jonah Apr 20 at 1:58

The easiest approach is to simply evaluate the inner sum directly. To this end, let $$S(i)$$ represent the inner summation; we consider cases where $$i$$ is even versus $$i$$ odd. Note that there are exactly $$(i+2) - 3 + 1 = i$$ terms in the sum. When the number of terms in the sum is even, they can be grouped into consecutive pairs. When the number of terms in the sum is odd, there is an "extra" term at the end which we will handle separately.
In the even case, say $$i = 2k$$, \begin{align*} S(i) = \sum_{j=3}^{i+2} j(-1)^j &= \sum_{j=3}^{2(k+1)} j(-1)^j \\ &= \sum_{m=1}^k (2m+1)(-1)^{2m+1} + (2m+2)(-1)^{2m+2} \\ &= \sum_{m=1}^k -(2m+1) + (2m+2) \\ &= \sum_{m=1}^k 1 = k = \frac{i}{2}. \end{align*} In the odd case, we have the "extra" final term $$(i+2)(-1)^{i+2} = -(i+2)$$ (remember, this last term is negative because if $$i$$ is odd, then so is $$i+2$$); thus $$S(i) = \sum_{j=3}^{i+2} j(-1)^j = \sum_{j=3}^{(i-1)+1} j(-1)^j + (i+2)(-1)^{i+2} = \frac{i-1}{2} - (i + 2) = -\frac{i+5}{2}.$$ Note carefully that in the second step, we wrote $$\sum_{j=3}^{(i-1)+2} j(-1)^j = \frac{i-1}{2}.$$ We did this because when $$i$$ is odd, this sum is now for an even $$i-1$$, so we can apply the result we had for the even case, except now $$i$$ is replaced with $$i-1$$. So now we put this together to find $$S(i) = \sum_{j=3}^{i+2}j(-1)^j = \begin{cases}i/2, & i \text{ is even} \\ -(i+5)/2, & i \text{ is odd.} \end{cases}$$ All that remains now is to evaluate the outer sum: $$\sum_{i=0}^{x-1}(4 + 4S(i)) = 4x + 4 \sum_{i=0}^{x-1} S(i).$$ Since $$S(i)$$ depends on whether $$i$$ is odd or even, the desired sum will also depend on whether $$x$$ is odd or even. As before, we count the number of terms as $$(x-1) - 0 + 1 = x$$, so if $$x$$ is even, we can pair off the terms, and if $$x$$ is odd, there will be an "extra" term left. In the even case, we can let $$x = 2k$$ and write $$\sum_{i=0}^{x-1} S(i) = \sum_{m=0}^{k-1} S(2m) + S(2m+1) = \sum_{m=0}^{k-1} m - \frac{(2m+1)+5}{2} = \sum_{m=0}^{k-1} (-3) = -3k = -\frac{3x}{2}.$$ And in the odd case, the final term is of the form $$S(x-1) = (x-1)/2$$ (remember, when $$x$$ is odd, $$x-1$$ is even and we must use the even case for $$S(i)$$), so the desired sum becomes $$-\frac{3(x-1)}{2} + (x-1)/2 = -(x-1)$$. So your answer for positive integers $$x$$ is $$\sum_{i=0}^{x-1} \left(4 + 4 \sum_{j=3}^{i+2} j(-1)^j \right) = \begin{cases} -2x, & x \text{ is even} \\ 4, & x \text{ is odd.}\end{cases}$$
You can expand directly: $$S=\sum_{i=0}^{x-1} \Biggl(4+4\sum_{j=3}^{i+2} j(-1)^j\Biggr)=\sum_{i=0}^{x-1}4+4\sum_{i=\color{red}1}^{x-1}\sum_{j=3}^{i+2} j(-1)^j=\\ 4x+4\sum_{i=1}^{x-1}[-3+4-5+\cdots +(-1)^{i+2}(i+2)]=\\ 4x+4[\underbrace{(-3)}_{i=1\\ x=2}+\underbrace{(-3+4)}_{i=2\\ x=3}+\underbrace{(-3+4-5)}_{i=3\\ x=4}+\cdots +(-3+4-5+\cdots +(-1)^{x+1}(x+1))]=\\ 4x+4\left[\underbrace{(\color{red}{-3})}_{i=1\\ x=2}+\underbrace{\color{blue}1}_{i=2\\ x=3}+\underbrace{(\color{red}{-4})}_{i=3\\ x=4}+\underbrace{\color{blue}2}_{i=4\\ x=5}\cdots +\begin{cases}-\left(\frac{x}{2}+2\right),x-even \\ \ \ \ \ \ \frac{x+1}2-1,x-odd \end{cases}\right]$$ When $$x$$ is even: \begin{align}S&= 4x+4\left[\color{red}{-\sum_{i=1}^{x/2} (i+2)}+\color{blue}{\sum_{i=1}^{x/2-1}i}\right]=\\ &= 4x+4\left[\color{red}{-\sum_{i=1}^{x/2} 2}+\color{blue}{\sum_{i=1}^{x/2-1}i}\color{red}{-\sum_{i=1}^{x/2} i}\right]=\\ &=4x+4\left[-2\cdot \frac x2-\frac x2\right]=4x-6x=\\ &=-2x.\end{align} I leave to you the calculation of the sum for odd $$x$$ as an exercise.