Call a positive integer a good number if its every digit is a prime number. Find all the good numbers having three digits and with the property that their squares are good numbers of five digits.
Japan Mathematical Olympiad First Stage, 2019
Solution
235
Let be a three-digit good number, then we can write , where are 1-digit primes. If is a good number with 5 digits, we must have , from which it follows that we have . Since , we conclude that must hold. When , the lowest digit of is 4, 9, 5, 9, respectively. If is also a good number, the lowest digit of must be 5, which, in turn, implies that must hold.
Since and , we conclude that the possibilities for the choice of is 225, 235, 255, 275. But, then , among which is the only good number. Therefore, we conclude that is the desired answer.
Want a route through all this instead of an archive? The track
puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.