where and are the first and last terms, and is the number of terms.
Now we want the sum of all the integers between and inclusive. So that is
And this is an AP where and the number of terms is
So plug these values into the formula above, and the sum is