Hello, everybody!
OK, last time I gave you this challenge,
and it was to use the numbers 1 to 9
to find a nine-digit number
such that the first digit was a number divisible by 1,
the first two digits was a number divisible by 2,
the first three digits was a number divisible by three,
and so on, until you end up with a nine-digit number
which is divisible by 9.
OK, to solve this,
let's call our nine-digit number
abcdefghi.
OK, so this is going to be our nine-digit number.
Let's write down what we know.
Let's start off with the first letter, a.
Now we're saying that the first digit
is divisible by 1.
So a--well, a could be anything.
So that really doesn't help us very much.
The first two digits is a number divisible by 2.
Oh, well, in that case, we can say that b is even.
So we know that much.
What else do we know?
The first five digits is a number divisible by 5.
That means that e has to be zero or five.
Well, there is no zero here,
so I can say
that e is 5.
What else?
The whole thing--the nine-digit number--
is a number divisible by 9.
Now, here's a fact for you.
If you use the numbers 1 to 9,
and make a nine-digit number,
the result, whatever it is,
will be divisible by nine.
So again, that really doesn't help us very much.
But in the same vein, let's come up with some other conditions.
We said the first three digits is a number divisible by three.
Well, in that case--
and this is a true fact--
that means that a plus b plus c is divisible by 3.
What other conditions can I come up with?
Well, the first four digits
is a number divisible by four.
So
I can say that 2c plus d
is divisible by four.
What other conditions?
Well, the first six digits
we can say
4a plus 4b plus 4c plus 4d plus 4e plus f
is divisible by 6.
What about the first eight digits?
Well, I can say
that 4f plus 2g plus h
is divisible by 8.
Now, you may have noticed that I skipped a condition here.
That's because the next one is quite complicated.
And it says
a plus 5b plus 4c plus 6d plus 2e plus 3f plus g
is divisible by 7--that is complicated.
When I solved this,
I ignored this last condition.
And I ended up with a short list
of about eight possible solutions,
and I just checked them through by hand.
But you do need this condition.
In fact, you need all those conditions.
All those conditions are necessary
and sufficient.
No more, no less.
And, if you use those conditions,
they are enough to tell you
that the answer is
381, 654,729.
Did you get it?
It is a hard one. It is challenging.
Now, where did I get these conditions from?
I got these conditions
from something called
'Modular Arithmetic.'
It's sometimes called 'clock arithmetic.'
And it's a mathematician's tool that we use all the time.
It's really useful. It helps us ignore multiples.
For example.
if it's a Monday
and you add seven days,
it's a Monday again.
Right? You all know that.
If it's a Monday, and I add fifteen days,
it's a Tuesday.
You know that you can ignore
multiples of 7.
Well, this idea
works in the same way.
So, for example,
the first three digits
was a number divisible by three.
So a-b-c
was divisible by 3.
To write that in another way,
I can say that 100a plus 10b plus c
is divisible by 3.
Now, modular arithmetic allows us to ignore
multiples of three.
So 99a
just disappears.
The 9b just disappears.
And I end up with 1a plus 1b plus 1c
is divisible by 3.
It simplifies a lot of problems, and it's really useful.
OK, and that's how you do it.
It was a problem for which
I needed wide screen, so I'm glad I used the new camera.
And
as usual, if you have been,
thanks for watching.