This is quite likely a super simple question, but I lack the descriptive power to be able to find the answer on Google!

Consider the following two number sequences:

00, 10, 20, 30, 40, 50, 60, 70, 80, 90
45, 45, 45, 45, 45, 45, 45, 45, 45, 45


Both sequences have a total value of 450, but one accumulates steadily in multiples of 10, whilst the second remains constant at 45.

The second is easy to ascertain, divide the total value by the number of instances in the list. But the first sequence I'm stuck on - can anyone help me understand the formula for ascertaining the accumulation value (in this instance 10) from 0?

My goal is to be able to take any number and divide it x number of times, with the first number in the sequence being 0 and steadily increasing - apportioning greater and greater values to those later in the sequence.

• The keywords you need are "arithmetic progression". – FredH Mar 25 at 4:33
• Thank you, that instantly helps a lot with my googling! – Ryan Gillies Mar 25 at 4:39

It's an arithmetic sequence (i. e. every next element is created from the previous with adding the same number) with the well-known formula for its sum

$$a_1 + a_2 + \cdots + a_n = {n \over 2}(a_1+a_n)$$

So, as $$a_1= 0,\ n = 10,\$$ and $$\ a_{10} = 90$$ you will obtain

$$00 + 10 +20 + \cdots + 90 = {10\over2}(0 + 90)= 5\cdot 90 = 450$$

If you know the first element ($$a_1$$), number of elements ($$n$$) and their sum ($$s$$), you may obtain the last element ($$a_n$$) by substituting the known values into the formula, and then isolate $$a_n$$:

$$a_n = {2s\over n}-a_1$$

You may then compute the difference $$d$$ between adjacent members as

$$d = {a_n-a_1\over n-1}$$

to consecutively obtain members between $$a_1$$ and $$a_n$$:

\begin{aligned} a_2 &= a_1+d\\a_3 &= a_2+d\\ &\cdots \end{aligned}

(To the question in your comment.)

• Using this approach it appears I need to know the answer to an (90) - if I only have a1 (0) and 450, could it still be done? – Ryan Gillies Mar 25 at 4:43
• @Ryan You have the values for n, $a_1$, and the sum. That leaves $a_n$ as the only variable. You can solve for $a_n$ to get $a_n=\frac{2}{n}(x)-a_1$ where $x$ is the sum (450 in your case). – Jacob Jones Mar 25 at 4:57
• Sorry yes you're right I forgot to include that in my comment, I will always know number of elements (n) first number in sequence (a1) and the sum (in this example 450). What I don't know is the last number in sequence (an). – Ryan Gillies Mar 25 at 4:57
• You need know also the number of elements ($n$) to substitute it to the given formula, because without this you may write the sum $450$ in many different ways, e. g. $450 = 0 + 450 = 0 + 150 + 300 = 0 +45 +90 +135 +180$. – MarianD Mar 25 at 5:00
• Nailed it, understood perfectly! Thank you so much for your help MarianD and @JacobJones! – Ryan Gillies Mar 25 at 5:01

$$\sum\limits_{i=0}^9 10 i = 10 \sum\limits_{i=0}^9 i = 10 \left[ \frac{(9+0)(9+1)}{2} \right] =450$$