[Math] Finding the sum of numbers between any two given numbers

arithmetic

I tried to derive this type of formula and ended up with this . But it's not holding true for all the numbers. Can you please tell whatenter image description here I've done wrong !!

Best Answer

Between $\alpha$ and $\beta$, there are $\beta - \alpha + 1$ numbers. We need \begin{align*} S &= \alpha + (\alpha + 1) + \cdots + \beta \\ &= \beta + (\beta - 1) +\cdots + \alpha \end{align*} Adding vertically, we have \begin{equation*} 2S = (\beta-\alpha+1)(\alpha+\beta) \end{equation*} Hence \begin{equation*} S = \frac{(\beta-\alpha+1)(\alpha+\beta)}{2} \end{equation*} This "reverse and add" technique is due to Gauss and can be used to sum any arithmetic progression as well.

Related Question