The door to Prof. Adams
laboratory has one of those keypad
locks that requires entering five
digits to open. Unfortunately, he
has a hard time remembering the
combination, but he has figured
out a way to determine it.
The five
digits are all different, and he has
observed that the first two digits
form a perfect square, while the last
two digits form a smaller perfect
square. Also, the middle digit is the
smallest. If he arranges the five
digits to form all possible five-digit
integers (leading zeros allowed) and
adds all these numbers, the sum is
a palindrome, with each of its digits
a multiple of three.
What is the
combination?
We're given the constraint that the first square of the combination is greater than the second and that the middle digit is the least.
We can find another constraint and eliminate the tedium of summing the permutations.
There are 5!=120 permutations and 5!/5=24 have a particular digit of the combination in each position.
If we set S=a+b+c+d+e, then the sum of the permutations is 24*11111*S which is to be a palindrome P.
P will be even and its last digit is divisible by 3 and is therefore 0 or 6.
Then the last digit of S must be one of 0,4,5,9.
It takes just a few minutes to find and test these possibilities:
25016 S=14 P=3733296
49016 S=20 P=5333280
49025 S=20 P=5333280
49236 S=24 P=6399936
81064 S=19 P=5066616
Only the fourth case yields a palindrome. Since every digit is divisible by 3 this is the answer and the combination is 49236.
|
Posted by xdog
on 2024-12-29 08:15:00 |