I'm going to show you a number sequence which is better than the Fibonacci sequence.
I know, I always say something is 'better than the Fibonacci sequence' because I don't really like it,
but, in this case, this is something that is similar, but uses a different rule.
So, the Fibonacci, just to remind everyone, you add 1 + 1, and that gives you 2...
...you add 1 + 2, that gives you 3...
and each time, what you're doing is taking the previous two,
and that gives you the next one, 5...
then you take the those two and that gives you the next one, 8
then that gives you the next one, 13,
so I'm adding them in pairs.
I'm going to do exactly the same thing, but instead of just adding them,
I'm also going to copy the last one.
So if I start with 1, 1, then I'm going to add 1 + 1, and that gives me 2.
but then I'm going to copy the last one, which is a 1.
The next pair is 1 and 2, you add them to get 3 and then copy the last one (above the bar), which is a 2.
Okay, now we have 2 and 1, and if I add them, I get another 3, and the last one (below the bar) is a 1,
and 1, 3, adding them gets you a 4, and the last one is a 3.
and add 3, 2, I get a 5, and the last one is a 2.
and if I carry on like this, there's another 5, last one is a 3... I keep going.
- So this beast grows quicker than you can keep up with it.
Which is amazing, right? Because with the Fibonacci, you're always at the end as you go along,
but this one's great, because as you're copying it, the bit you're working on,
the end of it is racing away from you.That's why I like that.
It's got a syncopated kind of beat, I feel, because you're not always just adding.
You're doing a bit of this and that, so it's not moving at a regular rate... but it 's writing one at the time, anyway
So I like it as a sequence. I think it's more interesting to generate.
It requires a bit more concentration than copying out the Fibonacci numbers, and you get these unusual numbers
this is called the Stern-Brocot sequence, and the Stern-Brocot numbers.
You might think, "well, what's so wonderful about this?"
and so what you do now is that you go back to the beginning of the Stern-Brocot numbers
and you take them in pairs to form a fraction. Let's mix it up with colours.
Let's take the first one of fraction. That's 1/1.
The next one as a fraction is 1/2,
so I'm taking them, numerator-denominator, numerator-denominator, all the way down in pairs...
The next one's 2/1, and then 2/3, 3/2, 2/3, and 3/1, 1/4...
and what will happen, if I carry that on, this will list out every possible fraction.
This will list every single ratio of whole numbers.
And not only that, it will always list them in their most simplified form,
and it will only ever list them once each.
- That's cool!
So no fraction will appear twice, no fraction will appear not as simple as it can be.
And none will be missed.
So this sequence gives you every single rational number in existence.
There are reasons why we'd want to list out and order all the rational numbers,
and actually, in one of the other NumberPhile videos, "Infinity is Bigger than you Think",
by the fine Dr. James Grime,
In Gödel's proof that the rationals are the same size as the reals. It's a video worth watching.
He uses a grid which is, unfortunately, is hugely inefficient,
because numbers appear in there more than once.
they appear and they're not in their simplest form, so you get 1/2--- you also get 2/4, and 4/8 and the rest,
whereas here, there's 1/2: No other fraction will ever appear which equals 1/2.
You get each one once and once only. This is really efficient.
This came out in a paper called Recounting the Rationals.
It's another way of counting the rationals.
and they've come up with this fantastic sequence, which then generate those fractions.
But that's not the only way to do it.
There's another way to generate every possible fraction,
without repeating them and they always appear in their most simplified form.
Start with the most simple fraction known to humankind, which is 1/1,
now two children are going to 'come off' this fraction.
One of them is going to inherit the top, and one is going to inherit the bottom.
And the missing number is going to be the sum of the numerator and denominator
so that's going to be 1/2, and that's going to be 2/1.
Each of those are going to have kids,
that one's going to inherit the top, that one's going to inherit the bottom.
That is the sum, and that is the sum.
In this one, the left one inherits the top and the right one inherits the bottom, the rest get the sums...
Here we go again.
Let's do another row. This is getting a bit bunched up, so I'll try to even it out.
That one gets the top, this one gets the bottom.
...gets the top, gets the bottom...
and that one gets the top, this one gets the bottom,
that is the sum there and there,
that is the sum there and there...
and then there and there.
And in this process, as you work your way down,
you will again list out every single fraction. It will list them all in the most simplified form
and it will not have any repeats.
You might think 'well, how am I going to read them off?'
well if you take a spiral, starting at 1/1, and then we're going to go around to 1/2, then 2/1,
and then we're going to go through these,
and then we're going to go through those.
and if you take the sequence along that spiral, it goes 1/1...
then it goes 1/2, then it goes 2/1, then it goes 1/3...
then goes 3/2, 2/3, 3/1, 1/4, and then it carries on
This is generating the exact same series of fractions that we got from the Stern-Brocot sequence.
In fact, you could start with this, and then go back to those numbers.
If you line up all the factions, you'd find they pair up all along,
and if you just remove the doubles, you get back to the original sequence.
- There are links to more from this interview and other videos on the topic here on the screen,
If you want to know more things on that, you can also check out [Matt Parker's] book,
"Things to Make and Do in the Fourth Dimension", which was recently released.
In fact, it's only just out in the US as I upload this.
I will put a bunch of links in the video's description.
It's a really good book, plus a really good way to throw your support behind Matt.
LEFT VIDEO: So, from this sequence I know there are three ways to write 6 in binary,
if you're allowed to use 2s as well.
And if you just love the way Matt looks, and why would you, he's also depicted on this new Numberphile poster.
I'll also pop a link to that in the video's description.