# Thread: sum of the integers

1. ## sum of the integers

Prove that the sum of all positive integers between m and n inclusive (n>m) is 1/2(m+n)(n-m+1).

2. ## Sum of AP

Hello thereddevils
Originally Posted by thereddevils
Prove that the sum of all positive integers between m and n inclusive (n>m) is 1/2(m+n)(n-m+1).
Do you know how to find the sum of an arithmetic progression (AP)? One formula (there are other versions of it) you can use is

$S = \frac{n}{2}(a+l)$

where $a$ and $l$ are the first and last terms, and $n$ is the number of terms.

Now we want the sum of all the integers between $m$ and $n$ inclusive. So that is

$m + (m+1) + ... + n$

And this is an AP where $a = m, l = n$ and the number of terms is $n - (m-1) = n - m + 1$

So plug these values into the formula above, and the sum is

$\tfrac{1}{2}(m+n)(n-m+1)$