This is called balanced ternary.
And what you do is you write your number in base three and then you replace all the 2s by minus 1s.
So let's do it.
0 is
fixed, 1 is fixed.
2 in base 3 just says 2, and the rule is replace all the 2s by minus 1s.
So this is now minus 1. 3 in ternary,
it's 1 0 so it doesn't change. 4 is
1 1 in ternary and it doesn't change, still 4. 5 is 1 2 which
becomes 1 comma minus 1. Now 1 comma minus 1 means 1 3 minus 1 so it's 2.
6 is
2 0 which becomes minus 1, 0 which is minus 3. Let me
remind you we're writing numbers in base 3. So it's minus 1 comma 0 sub 3. Which means minus 3
plus 0. - (Brady: 0 in the 1s position?) - In the 1s position. So it's minus 3. 7 is 2 1 which becomes
minus 1 1. So that's
minus 3 plus 1, which is minus 2. And so on. And if you do this, you get all the integers both positive and negative
exactly once. It's a way of, in a concise way, of enumerating all the num - all the integers. And
if you look at the graph, it looks like this. It looks like Star Wars, a scene from Star Wars.
(Brady: Oh, wow.) - Yeah, isn't that great? - (Brady: Yeah! Look at them, they're all the star destroyers)
(And that graph will eventually, as expands out, plot every single - ) - Yeah - (integer? Negative and positive?)
Yeah, yeah, they're all there. It just keeps going.
Wisteria,
so now the sequence is you take n, you write it in base 10 and you subtract the product of the nonzero digits.
1: product is 1, subtract, we get 0. 2: 0. 3: 0. Very boring up to 9...
0. Because the number minus the product of those digits is 0 if there's only one digit, okay, 10.
10 has one non-zero digit, 1, its product. So subtract it
we get 9.11 has the product is 1 so we get
10.12 product is 2 and we get 10. 13, I'm - look at the product of the nonzero digits and subtract it from the number, 10.
14 is 10 again and we are - let's jump forward.
And by the time we get up to 25, product of digits is 10, so we subtract 10 from 25 and we get 15.
So it's
drastically changed. 26, subtract 12 from
26 and we get 14 and
so on. The graph looks like this. I call it wisteria because, to a gardener,
this looks very like wisteria, purple flowers you see
in the trees.
(Brady: Nice, it's like the droop gets bigger, but it never droops further than - )
Well you're not subtracting very much, because you're looking at the product of the digits. And that's much less than what you started with since the
digits are all 9 or less.
(Brady: So once you start getting interesting numbers like, you know, 4692 - )
Yeah, so 4 times 6 times 9 times 2 is whatever it is, but it's not very big.
So it's not, it doesn't droop very far from what you started with. - (Brady: Some look like - some pretty big droops there)
Well, yes, they had a lot of big digits. - (Brady: I like that.) - Yeah, wisteria.
So this is the forest fire. And the rule is that we put down the
lexicographically earliest sequence, meaning you always pick the smallest numbers.
If you have a choice, go small. I'll just do it, that's easiest way.
We start off when we have a choice pick the smallest positive number. So so far
we don't have anything to worry about so I can pick a 1. It's got to be positive.
Ok, I can put another 1, because it's not a big deal. The rule says you may not have
three terms that are in an arithmetic progression, meaning the difference
between here and here is the same as the difference between here and here.
So a of i plus j, minus a of i must not equal a of i plus 2j, minus
a of i plus j. We've got two 1s here.
I would like to put a 1 here, because that's the smallest legal move,
but then the difference between - then these three terms. If we did that we'd have a 1 and
a 1, and a 1. And they would be equally spaced - that's not allowed. Ok.
It's not allowed, they jump by 0 each time. Equally spaced numbers with a constant difference between them.
It's not allowed. So we go to the next term, there's nothing wrong with putting a 2 there. Okay. Now, what about the next one?
Well, I could put a 1 there because there's there's no
conflicts. So we've put in 1 there. Now, what about here? Could I put a 1 there?
Yes I could; I can and therefore I must. - (Brady: Because there are no three 1s that are evenly spaced?) - Yes
Let's go on, you'll see. Now, so the sequence begins 1 1 2 1 1. Now what can I put here?
(Brady: You should always ask: can I put a 1?) - Can you put a 1, you start off,
can I put a 1? can I put a 2? We can't put a 1 because we'd have 1 1 1 and
that would be a violation of the rule.
Constant increment of 0, 3 equally spaced terms. - (Brady: Can I put a 2?) - I think we can do a 2.
So we've got 1 1 2 1 1 2. All right. What's the next term? Now,
could it be a 1? Well,
I think it's going to be a problem if we have a 1 because 1 to 4 to 7, we would have a 1,
jump of 3, and a 1, again for a jump of 3 - that's not allowed.
That would be an arithmetic progression, 1 1 1 at
three terms which are equally spaced. So that can't be a 1. Could it be a 2? Well - - (Brady: Yes)
Are you sure? It looks like it could be a 2, yeah, okay 2.
Nothing wrong. Okay. What about the next term?
Could it be a 1? Well it can't be a 1, by the same rule, because we'd have 2, 5, 8 - that would be a
1 1 1, no. Verboten,
forbidden, not allowed. So it can't be a 1. Could it be a 2? Well, no, because then we'd have 2 2 2. Okay,
could it be a 3? Well if it was a 3,
now here we see something a little bit more subtle. If this was a 3 we would have 1 2 3,
constant difference of 1 at three equally spaced points.
No, can't be a 3, but it can be a 4. And it keeps going. That's the sequence. It's well defined,
it's unique and it's crazy.
It looks like this. Here is a graph of it. It's actually been filtered out a little bit.
The picture is very busy
so one of my friends, Xan Gregg, removed some of the, the blackness from it.
So it looks like this, this is a hundred thousand terms and you notice this, this pattern of smoke which is
repeating. It has a fractal structure. And we do not have any explanation for that. You think, wow,
this is such an elegant definition,
what's going on? No one has analysed this.
(Brady: What do you mean by no one's analysed it? What do you want them to find out about it?)
(Like what would, what would be - ) - Well you could say, for instance, what we have here is something like the Easter Island heads,
that get bigger and bigger and bigger and they're spaced at such-and-such an interval. But there is some regularity, what is it?
When is the next blob gonna be? How big is the blob? What's going on?
So when we first started plotting
sequences in the OEIS,
or converting them to music. I made two artificial
sequences to display this. The music one is Für Elise converted to sounds.
That's sequence A123456 if you are interested. To display the graph I made this sequence and
you say what on Earth? What sequence is this?
Well, it's very simple.
If you turn it around it is a famous profile. Head of a Woman in Profile
from the Cleveland Museum of Art. (Brady: Why'd you pick that one? 'Cause it's, 'cause it's - )
It's a clean line. And it's also a beautiful drawing. - (Brady: And have you found any properties to the numbers in the sequence or?)
No, no. - (Brady: It's be great if you found out it had some equation or something!) - Yeah, right, yeah.
All right then, this is Brilliant. They've sponsored today's video. I'm gonna go back into this geometry
fundamentals course. I've been doing it before. I'm doing alright, let's see what I'm up to here.
27 unit cubes are packed together to create - looks like a Rubik's Cube. If all eight of the corner cubes are removed,
how much will the surface area of the figure increase? So I'm removing
three, and
I'm exposing
three. I think it will stay the same, won't it?
Yes!
Aha, yes,
nice.
Shall we have a look at what's next? How many of the following nets can fold up into the square pyramid shown above?
Look people if you want to check out this course, or all the other ones on Brilliant - have a look at this.
Look at all the courses they've got, look at them all.
Algebra fundamentals,
Algebra 1, Algebra 2, Trigonometry, Pre-Calculus. Also, I will recommend the daily challenges.
These are always great fun - power tower comparison.
Which of these two expressions is larger?
3 to the 3 to the 3 to the 2 or 2 to the 3 to the 3 to the 3?
What do you reckon? I'm gonna go
that one.
Am I right? Anyway people go to brilliant.org/numberphile
There's loads of stuff on there for free,
but if you use that /numberphile
you're gonna get 20% off a premium membership and that unlocks all the good stuff - everything on Brilliant
you've got access to. brilliant.org/numberphile, our thanks to them for supporting this episode.
This was the second in a small trilogy of videos with Neil about
amazing graphs. The third and final one is coming very soon.
[Preview] ]Pretty obviously it's never going to happen if you look at the graph.
And by the way if you haven't checked out the Numberphile podcast yet,
the latest episode of that is also an interview with Neil. Search Numberphile on your podcast player,
or you can watch them here on YouTube on our other channel,
Numberphile2