1. ## Summatory

Could you explain me how to get this result?

2. ## Re: Summatory

$\sum_{j=1}^{n-1} (n-j)(n-j-k) = \sum_{k=1}^{n-1} k(k-2) = \sum_{k=1}^{n-1} (k^2 - 2k) = \sum_{k=1}^{n-1} k^2 - 2\sum_{k=1}^{n-1} k$

For the first step, think about the values that $(n-j)$ takes. I've just replaced $(n-j)$ with $k$ and reversed the order of the terms in the sum.
The remaining steps should be quite straightforward.
The sums in the final expression are well known but easily derived:
$\sum_{i=1}^n \big(i^2 - (i-1)^2\big) = \sum_{i=1}^n \big(i^2 - (i^2-2i+1)\big) = \sum_{i=1}^n (2i-1)$
The left hand expression is a telescoping sum. You can use the equation to determine an expression for $\sum_{i=1}^n i$

Similiarly:
$\sum_{i=1}^n \big(i^3 - (i-1)^3\big) = \sum_{i=1}^n \big(i^3 - (i^3-3i^2+3i-1)\big) = \sum_{i=1}^n (3i^2-3i+1)$
Which can be used to derive an expression for $\sum_{i=1}^n i^2$