# Finding the value of $\sum_{n=5}^{204} (n - 2)$

Is there a generalized formula for finding a sum such as this one? I'm going over an old quiz for a programming class but I'm not able to solve it:

$$\sum_{n=5}^{204} (n - 2)$$

I know this is probably dead simple, but I'm seriously lacking on the math side of computer science.

$$\sum_{n=5-4}^{204-4}((n+4)-2)=\sum_{n=1}^{200}(n+2)=\frac{200.(200+1)}{2}+2.200=20500$$
$$\sum_{i=1}^{n}i = \frac{n(n+1)}{2}, \quad \sum_{i=1}^{n}1 = n.$$
The other answers mention that you require the sum $\sum_{1}^{k} n=\frac{k(k+1)}{2}$. It is also useful to note that $$\sum_{n=5}^{204}(n-2)=\sum_{n=3}^{202}n$$ This is called shifting the index, and to convince yourself it works you can just write out the first few terms of each side.
the only thing that you have to kcon is that : $$\sum_{k=0}^{n} k = \frac{n(n+1)}{2}$$