0

I have the following sum

$$\sum_{i = 0}^{n-2}\sum_{j=i}^{n}(i + j) + \sum_{i = 0}^{n-2}\sum_{j=i}^{n}1$$?

and i have no idea how to continue from here?

  • Can't you manage the second part? What is the sum of 1 from $j=i$ to $n$? Then sum that from $i=0$ to $n-2$. – almagest Apr 01 '16 at 10:15
  • It would be helpful if you could give us more detail on what exactly is confusing you here. The more effort you put into your question, the more effort we put into our answers. =) – David H Apr 01 '16 at 10:25

2 Answers2

1

For each fixed value of $i$, $\sum_{j=i}^n(i+j)$ is the sum of the consecutive integers starting with $2i$ and ending with $i+n$. You should know at least two ways to evaluate this.

  • It’s the sum of a finite arithmetic progression. The first term is $2i$, the last is $i+n$, and there are $n-i+1$ terms, so the sum is $$\frac{(n-i+1)\big(2i+(n+i)\big)}2=\frac{(n-i+1)(n+3i)}2=\frac12\left(n^2+n+(2n+3)i-3i^2\right)\;.$$

  • It’s the sum of the first $i+n$ positive integers minus the sum of the first $2i-1$ positive integers, which is $$\frac{(i+n)(i+n+1)}2-\frac{2i(2i-1)}2$$ and of course simplifies to the same thing.

Thus,

$$\begin{align*} \sum_{i=0}^{n-2}\sum_{j-i}^n(i+j)&=\frac12\sum_{i=0}^{n-2}\left(n^2+n+(2n+3)i-3i^2\right)\\ &=\frac12\left(\sum_{i=0}^{n-2}\left(n^2+n\right)+\sum_{i=0}^{n-2}(2n+3)i-\sum_{i=0}^{n-2}3i^2\right)\\ &=\frac{n^2+n}2\sum_{i=0}^{n-2}1+\frac{2n+3}2\sum_{i=0}^{n-2}i-\frac32\sum_{i=0}^{n-2}i^2\;. \end{align*}$$

Now $\sum_{i=0}^{n-2}1$ is just the sum of $n-1$ ones, so it’s $n-1$, and $\sum_{k=0}^{n-2}i=\frac{(n-2)(n-1)}2$ as the sum of the first $n-2$ consecutive positive integers. For the last summation you need to know that

$$\sum_{k=1}^mk^2=\frac{m(m+1)(2m+1)}6\;,$$

something that can be proved, for instance, by induction on $m$. When the algebra’s done, you should find that

$$\sum_{i=0}^{n-2}\sum_{j=i}^n(i+j)=\frac{n^3+3n^2-10n+6}2\;.$$

I’ll leave the evaluation of

$$\sum_{i=0}^{n-2}\sum_{j=i}^n1$$

to you, as it requires nothing that I’ve not already mentioned.

Brian M. Scott
  • 616,228
  • I was off on the first summation but the second one is definitely $n^2-1$. – Faraad Armwood Apr 01 '16 at 23:43
  • @Faraad: The one that you calculated in your answer is, but the one in the question is not. You had the inner summation running from $0$ to $n$, but in the question it’s from $i$ to $n$, just as it is in the first double summation. (Sorry: I should have mentioned that in my original comment.) – Brian M. Scott Apr 01 '16 at 23:44
  • Oh wow. Yeah, so the only reason my calculations were off was because I was starting at zero and the first one I'll fix since I seen $1$ for the lower sum instead of $i$. – Faraad Armwood Apr 01 '16 at 23:52
0

$$\begin{align} \sum_{i=0}^{n}\sum_{j=i}^n (i+j+1) &=\sum_{j=0}^n\sum_{i=0}^j (i+j+1)\\ &=\sum_{j=0}^n\binom {j+1}2+(j+1)^2\\ &=\sum_{j=1}^{n+1}\binom j2+j^2\\ &=\sum_{j=1}^{n+1}2\binom j2+\binom {j+1}2 &&\text{as } j^2=\binom j2+\binom {j+1}2\\ &=2\binom{n+2}3+\binom{n+3}3\\ &=\frac12 (n+1)^2(n+2)\\ \sum_{i=0}^{n-2}\sum_{j=i}^n (i+j)+\sum_{i=0}^{n-2}\sum_{j=i}^n 1 &=\sum_{i=0}^{n-2}\sum_{j=i}^n (i+j+1)\\ &=\sum_{i=0}^{n}\sum_{j=i}^n (i+j+1)-\sum_{i=n-1}^{n}\sum_{j=i}^n (i+j+1)\\ &=\frac 12(n+1)^2(n+2)-6n\\ &=\frac 12 (n-1)(n^2+5n-2)\qquad\blacksquare\end{align}$$


$$\color{lightgrey}{\text {NB} \qquad\qquad\sum_{i=n-1}^{n}\sum_{j=i}^n (i+j+1)=(2n-1)+2n+(2n+1)=6n}$$