I've been trying to get this sum: $\sum_{i}^{n} \sum_{j=0}^{n-i}j$ into a closed formula but couldn't really understand how to "unpack" that nested sum.
It occured to me that the answer is: $$\sum_{i=1}^n \left(\sum_{j=0}^{n-i} j\right) = \frac16 n (n^2-1)$$

But I can't figure out why.