Consecutive even or odd numbers and their sum not starting at 1 Now to find the sum of even numbers or odd number starting at $1$ I know how to find the solution.  For even let $n\in \mathbf{N}$ then $$\sum_{j=1}^n 2j=2\sum_{j=1}^n j=2 \frac{n(n+1)}{2}=n(n+1),$$ similarly for the odds $$\sum_{j=1}^n 2j-1=2\sum_{j=1}^n j-\sum_{j=1}^n 1=n(n+1)-n=n^2.$$  My question is how to find a formula for when the starting index is not 1.  For instance lets say 10.  My Idea is just to shift the index.  So for evens I would do the following: $$\sum_{j=10}^n 2j=\sum_{i=1}^{n-9} 2(i+9)=\sum_{j=1}^{n-9}2j+\sum_{j=1}^{n-9}18=(n-10)(n-9)+18(n-9),$$ similarly for odds $$\sum_{j=10}^n 2j-1=\sum_{i=1}^{n-9}2(i+9)-1=\sum_{j=1}^{n-9}2j-\sum_{j=1}^{n-9}17=(n-9)(n-10)-17(n-9).$$  I am trying to find a closed form solution to a question like find the sum of all even(odd) numbers between 33 and 90 or 42 and 82 or 12 and 20?
 A: Hint: For any function $\phi(j)$ ($\phi(j)=j$ for example)
$$\sum_{j=k}^n\phi(j)=\sum_{j=1}^n\phi(j)-\sum_{j=1}^{k-1}\phi(j).$$
A: A consecutive set of odd or even numbers forms an arithmetic progression (AP), where each term is a fixed amount (here $2$) bigger than the previous term. The formula for the sum of an AP $\{a_i\}$ with $n$ terms is well-known:
$$\sum_{i=1}^{n} a_i = n\frac{a_1+a_n}{2}$$
For your cases, it remains to find the values of the first and last terms in the sum and the number of items, but these are not hard to calculate generally.
A: HINT: observe that you can rewrite any summation as
$$\sum_{k=u}^v f(k)=\sum_{u\le k\le v}f(k)=\sum_{0\le k-u\le v-u}f(k)=\sum_{0\le j\le v-u}f(j+u)=\sum_{j=0}^{v-u}f(j+u)$$
where $j=k-u$ (equivalently $k=j+u$). Or more simple, observe that
$$\sum_{k=u}^v f(k)=\sum_{k=0}^v f(k)-\sum_{k=0}^{u-1}f(k)$$
Another way, more complex, is to find the closed form for an indefinite sum, you can learn something about this here. After you take the limits that you want.
