I have written down three different 5-digit perfect squares, which :
* between them use five different digits.
* each of the five digits is used a different number of times
* the five numbers of times being the same as the five digits of the perfect squares.
* no digit is used its own number of times.
* If you knew which digit I have used just once, you could deduce my three squares with certainty.
What are the three perfect squares?
Source:
a math puzzle posted to the SAS Discussion Forum (from New Scientist magazine).
12321 33124 34225
So, we're talking only about the digits 1 to 5, since they add to 15
There are only 9 candidate squares:
12321, 12544, 13225, 33124, 34225, 35344, 44521, 52441, 55225
Therefore there are 9x8x7=504 candidate trios. Of these, by inspection
there are 14 that have the right spread of digits:
1 12321 12544 55225
2 12321 33124 34225
3 12321 44521 55225
4 12321 52441 55225
5 12544 34225 44521
6 12544 34225 52441
7 12544 35344 55225
8 13225 33124 55225
9 13225 35344 55225
10 33124 34225 35344
11 33124 34225 55225
12 34225 44521 52441
13 35344 44521 55225
14 35344 52441 55225
Going through with the thought if I have only one "n"
I will have a unique trio, for n=1 to 5, we see: If I use 4 once this is:
13225 33124 55225
But this is invalid, since 3 is use thrice.
Finally, if I use 5 once, this is it:
12321 33124 34225
roots: 111 182 185
Usage
1: 3 times
2: 5 times
3: 4 times
4: 2 times
5: 1 times
The programs to generate the lists are unremarkable.
The judgement came in where to code and where to just look...
Edited on August 1, 2023, 11:31 pm