Enigma 369: A safe number
4 November 2016
Posted by on
From New Scientist #1518, 24th July 1986 [link]
“My memory is poor, but accurate,” said Mooncalf. “I remember just enough of the characteristics of my safe combination to enable me to reconstruct the number when I forget it. It contains a pair of 1s separated by one digit, a pair of 2s separated by two digits, a pair of 3s separated by three digits and so on, there being twice as many digits in the number as the value of the highest digit. Yet I can’t even remember the highest pair of digits.”
“There must be many such numbers,” I opined, reaching for my notepad. “For example, 312132. That has two 1s separated by one digit, two 2s separated by two digits and two 3s separated by three digits.”
“Yes. But what makes my safe number unique is that it is the highest number that can be formed in this way. As an aide-mémoire, I have written part of it on a card. If anyone stumbles across it he is unlikely to tumble to its true significance. First I write the safe number backwards. Then, starting from the right I discard from this number, one by one, as many digits as I can, consistent with there occurring at least once in the number which remains each digit of the original number. This final number is my aide-mémoire.”
“You mean if it were 41312432 you would be left with 23421 on the card?”
“Exactly. But I have locked it away in the safe, and I want you to help me to deduce my combination so I can open the safe and retrieve it.”
Scratching my head, I got down to work. In no time at all I had deduced the number and had retrieved Mooncalf’s card.
What was the number inscribed on it?