Simplifying the Summation of Summations: $ \sum_{n = 0}^{w}({ \sum_{k = n}^{2n} (k) })$ My question is about the simplification of the following summation: $\sum_{n = 0}^{w}({ \sum_{k = n}^{2n} (k) })$.
I have used Mathematica and obtained that $ \sum_{n = 0}^{w}({ \sum_{k = n}^{2n} (k) }) = \frac{1}{2} w (w + 1) (w + 2)$. Even though this is all I originally needed to know for the problem, I am curious to know how this simplification is actually done because I don't quite understand it. (I think it just surpasses my current mathematical knowledge).
Could anyone explain this to me?
Thanks in advance.
 A: In this case, we can deal with the inside sum separately.
$\sum_{k=n}^{2n}{k} = \sum_{i=0}^{n}{i+n} = \sum_{i=0}^{n}{i} + \sum_{i=0}^{n}{n} = \frac{n(n+1)}{2} + n(n+1) = \frac{3}{2}n(n+1).$
Therefore, the original sum reduces to $\frac{3}{2}\sum_{n=0}^{w}{n^2 + n}$.
Using the equation for the sum of the first $w$ squares, we have:
$$ \sum_{n=0}^{w}{n^2+n} = \frac{w(w+1)(2w+1)}{6} + \frac{w(w+1)}{2}$$
Simplifying, this reduces to $\frac{w(w+1)(w+2)}{3}$.
Bringing back in the leading factor of $3/2$ yields the final result of:
$$ \sum_{n=0}^{w}{\sum_{k=n}^{2n}{k}}  = \frac{1}{2} w(w+1)(w+2)$$
A: Using :
$$\sum_{k = 0}^{n} k=\frac{n(n+1)}{2}$$
$$\sum_{k = 0}^{n} k^2=\frac{n(n+1)(2n+1)}{6}$$
We get :
$$\sum_{n = 0}^{w}{ \sum_{k = n}^{2n} k }=\sum_{n = 0}^{w}\left(\sum_{k = 0}^{2n} k -\sum_{k = 0}^{n-1} k \right)=\sum_{n = 0}^{w}\left(\frac{(2n+1)2n}{2} -\frac{n(n-1)}2 \right)\\=\frac32\sum_{n = 0}^{w}n^2  +\frac32\sum_{n = 0}^{w}n\\=\frac32\left(\frac{w(w+1)(2w+1)}{6}+\frac{w(w+1)}{2}\right)\\=\frac32w(w+1)\frac12\left(\frac{2w+1}{3}+1\right)\\=\frac14w(w+1)(2w+4)\\=\frac12w(w+1)(w+2)$$
