1. ## Help with summations.

Hello, I am having trouble solving this summation:

Summation from j=i to N-1 of: (j-i+1)

The answer is said to be: ((N-i+1)(N-i)) / 2

I have tried separating the summation into three separate summations consisting of:
(summation from j=i to N-1 of j) - (summation from j=i to N-1 of i) + (summation from j=i to N-1 of 1)
This leads me to: ((N+2)(N-1) / 2) - i(N-i-1)
But that is obviously not the right answer (unless I am simplifying something incorrectly). Please let me know what I am doing wrong. I have been stuck on this problem for a while now and I need to move on with my homework. Thank you very much for your help.

2. Originally Posted by collegestudent321
Hello, I am having trouble solving this summation:

Summation from j=i to N-1 of: (j-i+1)

The answer is said to be: ((N-i+1)(N-i)) / 2

I have tried separating the summation into three separate summations consisting of:
(summation from j=i to N-1 of j) - (summation from j=i to N-1 of i) + (summation from j=i to N-1 of 1)
This leads me to: ((N+2)(N-1) / 2) - i(N-i-1)
But that is obviously not the right answer (unless I am simplifying something incorrectly). Please let me know what I am doing wrong. I have been stuck on this problem for a while now and I need to move on with my homework. Thank you very much for your help.
Well, it's an arithmetic series having $(N-1)-i+1=N-i$ terms (assuming that $i\leq N-1$). Therefore, summing the series can be done by multiplying the average of the first and last term by the number of terms. This gives

$\frac{(i-i+1)+(N-1-i+1)}{2}\cdot (N-i)=\frac{(N-i+1)\cdot (N-i)}{2}$