I have the following summations:
$$ \sum_{i = 0}^{n-1} \sum_{j = 0}^{n-2} \sum_{k =j+1}^{n-1} 1 $$
and I know that the first step should be like this:
$$ \sum_{i = 0}^{n-1} \sum_{j = 0}^{n-2} (n - j - 1)$$
But I don't know how to get this. What is the mechanism?
$$ \sum_{i = 0}^{n-1} \sum_{j = 0}^{n-2} (n - j - 1)= n\cdot \sum_{j = 0}^{n-2} (n - j - 1)$$
$$\sum_{j = 0}^{n-2} (n - j - 1)=1+2+\cdots+(n-1)=\frac{n(n-1)}{2}$$