# i need help in solving this particular summation

Lets assume i am asked to find the result of the following summation

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

Down below is my attempt at solving this summation

i know i can break down the summation like this...

$\sum_{i=1}^{n-2} i$ + $\sum_{i=1}^{n-2} -1$

this is where i am stuck....i thought at first that i can apply the following rule to the first summation.

$\sum_{i=1}^{n} i$ = $n(n +1)/ 2$

but the $n - 2$ is really throwing me off.

Can someone give me some advice on what to do next?

• Isn't that $0+1+2+\cdots+(n-4)+(n-3)$? – Lord Shark the Unknown Jan 26 '18 at 7:49

Introduce a new variable, $m=n-2$.

Then $$\sum_{i=1}^{n-2} i = \sum_{i=1}^m i = \frac{m(m+1)}{2} = \frac{(n-2)(n-2+1)}{2}$$

• Does the same logic apply with $\sum_{i=1}^{n-2} (-1)$? i should apply one of the summation rules and multiply (n - 2) with -1? is this correct? – Soon_to_be_code_master Jan 26 '18 at 7:46
• @Soon_to_be_code_master Yes, the same logic applies. – 5xum Jan 26 '18 at 7:47

Note that $$\sum_{i=1}^{n-2} (i-1)=\sum_{i=1}^{n-2}i-\sum_{i=1}^{n-2}1=\frac{(n-2)(n-2+1)}2-(n-2)=\frac12(n-1)(n-2)-(n-2)$$

so $$\boxed{\sum_{i=1}^{n-2} (i-1)=\frac12(n-2)(n-3)}$$

Just apply the formula

$$\sum_{i=1}^{n-2} i=(\sum_{i=1}^{n} i)-(n-1)-(n)=\frac {n(n+1)}{2}-(n-1)-(n)=\frac {(n-2)(n-1)}{2}$$