# Simplifying the summation $\sum_{j=0}^{n-2} (n - j)$

I was studying the iteration method and one sample had this summation:

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

Where this eventually gets simplified as:

$n(n-1) - {(n-2)(n-1)\over 2}$

I did not quite understand how this is achieved. The first step is obviously split them so:

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

• It's the old summation formula $\sum_{j=0}^k j = \frac{k(k+1)}{2}$ that Gauss found as a kid (it was of course known before that to mathematicians). – Daniel Fischer Aug 13 '13 at 10:42

In the first sum we add $n-1$ times the number $n$ so we find $n(n-1)$ and for the second sum we can prove the result by induction or we use the Gauss method: denote by $S$ the desired sum so $$1+2+\cdots+(n-2)=S\\ (n-2)+(n-1)+\cdots 1=S$$ then if we add the first term with the first in the two equalities and the second with the second and so on we find $$(n-1)+(n-1)+\cdots+(n-1)=(n-2)(n-1)=2S$$ so we deduce $S$.
• For the second sum we add the two equalities term by term and on the RHS we add $S+S=2S$ Right? – user63181 Aug 13 '13 at 10:59
• In the sum $\sum_{j=p}^q$ the number of terms is $q-p+1$. – user63181 Aug 13 '13 at 11:20
You can change the order of summation and let variable $k=n-j.$ So $$\sum_{j=0}^{n-2} (n - j)$$ becomes $$\sum_{k=2}^{n} k$$ which is $\frac{n(n+1)}2-1$