[Math] How to derive the sum of an arithmetic sequence

algebra-precalculusarithmeticsequences-and-series

I'm attempting to derive a formula for the sum of all elements of an arithmetic series, given the first term, the limiting term (the number that no number in the sequence is higher than), and the difference between each term; however, I am unable to find one that works. Here is what I have so far:

Let $a_0$ be the first term, $a_n$ be the last term, and $x$ be the difference between each term.

If we have the sequence $a_0, a_0 + x, a_0 + 2x … a_n$, then we can add the first and last term, the second and second last term, etc., to quickly find the sum based on the number of terms. Thus, the sum of these terms is $n\frac{(a_n + a_0)}{2}$, where $n$ is the total number of terms.

The number of terms must be the number of times the first term was increased by $x$ plus one (to account for the first term), and so $n = \frac{(a_n – a_0)}{x} + 1$.

Thus, the sum is equal to $(\frac{(a_n – a_0)}{x} + 1)\frac{(a_n + a_0)}{2}$.

However, I am unable to integrate the limiting term in the place of $a_n$; any ideas for how to make this work?

In case my definition of a limiting term is ambiguous; an example would be if there was a set $3, 6, 9$; I'd like to be able to replace $a_n$ (which is $9$ in this case) with any number above $9$, and below $12$, and still get the same answer.

Best Answer

Essentially, you want to "round" $a_n$ down to the greatest number which can be expressed as $a_0 + kx$ for some integer $x$. One way to do so is to replace $a_n$ by $(a_0+x\lfloor\frac{a_n-a_0}{x}\rfloor)$ in your summation formula.

Related Question