# The averaging sequence... does it end?

**Most of you know of the Fibonacci sequence where you add the previous two terms to get the next, but let's try something different.**

Lets start off with any two numbers, say 0 and 1. The averaging sequence is simple. Take the average of the previous two numbers to get the next. So the next term would be (0+1)/2= 1/2. Continuing this on, we would get

(By the way check if the pattern is right if you don't believe it yourself)

If I were to graph this I would get something like:

Where the x axis gives a sense of the order of the terms.

So you see that this sequence does tend towards something... but what is it?

So here we get our hands dirty into the maths. What is interesting to notice is how you directly get from one term to the next. to go from 0 to 1, we add 1. to go from 1 to 1/2, we subtract 1/2. To go from 1/2 to 3/4 we add 1/4. So we can see to get any particular term we can just follow the sequence:

Now some of you may realise that this is a geometric sequence! It is a pattern where you multiply by some number to get the next term. To go from any number to the next number we simply multiply by -1/2. The part that makes this special is that we can actually take the sum *forever. *

A quick google search for the limiting sum (the sum if you add a pattern like this forever) of a geometric sequence is given by

Where a is the first number (in our case it's 1) and r is the ratio from any number to the next (in our case it is -1/2).

Simply substituting and solving gets us

Putting this on the graph would look like

Which does seem plausible. But what if I started with any other number? Why should I start with 0 and 1? Let's consider if we added 1 to both starting numbers, so that we start at 1 and 2. The way this can be interpreted is simply this graph above being shifted up by 1. and so it would be obvious that the pattern would get closer and closer towards 5/3, as this limit would increase by 1 too. The same principle goes if we did the same for 2 & 3, or 10 & 11. But what if we tried something different then? What if we did 1 and 0 instead of 0 and 1? Would I then approach the same 2/3? Well the sequence would be:

Clearly this is a different pattern so I would get a different limit. But I can still take the same approach. To get the next number I get the pattern

But this is almost the same as the geometric sequence up at the top! The only difference is that it is 1-(the whole thing). So following from earlier we would get

But this was also a specific case! In Mathematics, we want to go for a general case to work with. So lets start with a more general case of starting numbers of 0 and *d*. This would get us the pattern

This is the same pattern as the very first one! Except that everything is multiplied by the number *d*. So it would follow then that the pattern tends towards 2/3 of *d*. Now we can go towards the most general case. That we start with any two numbers, *a* and *b*. I can write *b*=*a*+*d* where *d* is simply the difference of *b* and *a*. So I can write the sequence as

And as before, by adding the same number to the first 2 terms, we add the same number to every term. If the average of two numbers m & n is p, then the average of (l+m) & (l+n) is (l+p). And so the limit would be the same 2/3 of *d* but we add *a* to that as well.

So the pattern of any starting numbers a and (a+d) follows and tends towards a+(2/3)*d*.
What if we are a little "biased" though? What if we take a sort of weighted average. Let me make a pattern like this. We start with 0 and 1. But to get to the next number, we take the average of 0 and 1, but the 1 gets counted twice. So the next number is (0+1+1)/3=2/3. So now my pattern goes like

Again let's try the same approach. To get from one number to the next we would do

Which again is a limiting sum of a geometric sequence. We can use the same limiting sum formula (ignoring the 0) and get ourselves the number this pattern approaches.

Now we can really generalise on this! What if I started from 0 and 1 and counted the 1, *n* times. So to get the next term we get

So the most recent number gets multiplied by *n*, and then averaged with the number before it. This would make a sequence in terms of *n*, looking like this

(I know, its a lot to take in and looks quite complicated, but bear with me here please)

If we follow like earlier and see what is required to get any particular term, we end up with yet another geometric sequence

So to see what this sequence approaches, we simply find the limiting sum of the series

Now we can again generalise this more with starting numbers 0 and *d*, which gets us the sequence

As this is the same sequence as the case where we started with 0 and 1 except that all the numbers are multiplied by *d*, we end up with our limit multiplying by *d* as well.

and finally, we end up with our most general case, where we start with any number *a*, and the second number *a*+*d*, and taking weighted averages like before.

The limit now would also have *a* added to it, so it would become

So any averaging sequence, where you take a weighted average of the previous two numbers to get the next, doesn't end. But with each new term it does always get closer to a certain limit.