For a while now, I have been subscribed to
Mind-Benders for the Quarantined by
MoMath (the US's National Museum of Mathematics). Some of the puzzles are
quite difficult and cannot be solved without some mathematical theory, even
though the puzzles are meant for all age groups. But some are definitely
interesting, and
really suitable for anyone!
The last puzzle was about a "self-referential number".
PUZZLE: Self-Referential Number
The first digit of a certain 8-digit integer N is the number of zeroes in
the (ordinary, decimal) representation of N. The second digit is the
number of ones; the third, the number of twos; the fourth, the number of
threes; the fifth, the number of fours; the sixth, the number of fives; the
seventh, the number of sixes; and, finally, the eighth is the total number
of distinct digits that appear in N. What is N?
I tried this out and at first couldn't seem to get a number that worked. And
then, during a particularly long and boring meeting, I played about with the
numbers again, and suddenly hit the jackpot!
23110105 has
2 zeroes
3 ones
1 two
1 three
0 fours
1 five
0 sixes
and 5 distinct digits: 0, 1, 2, 3, 5
The puzzles are sent out on Sundays, with a hint given on Tuesday, a push (aka
additional hint) given on Thursday, and the solution on Saturday.
The hint came:
HINT: Iteration can work magic.
It made no sense to me, but I had already found the solution, so I was just
waiting to see what method they would give to get the solution.
PUSH: What happens if you try some random 8-digit number, count zeroes,
etc., to get a new 8-digit number, and then try again on the new number?
This made me try out the iteration that they mentioned. In my earlier attempt,
I had already ruled out having any digits above 5 in the first seven digits
(if there are six of a certain digit, we wouldn't be able to fulfill the other
requirements, because the total of the first seven digits can be at most
eight). So I started with a number without any of those bigger digits.
My iterations:
12303241
12221005
22300104
31211005
23110105
23110105 --> same as the number before it!
So this method does work... but why?
Unfortunately the solution to the puzzle does not even tell us why! They
showed us the iterative method that I used above, and their comments were:
But why should this work in a reasonable number of steps? Indeed, why
should it work at all?
Sadly, I don't know. This method does not work with all problems of this
type. But it is surprisingly useful — a great weapon to have in your
armory.
(Thanks for probabilist Ander Holroyd for creating and
contributing this puzzle!)
They also said "It's pretty tough to work out N by reasoning" before giving the iterative method as the "easy way", so I guess I shall just give myself a pat on the back for somehow finding that number, and just leave it at that. :P