Answer: (a) 11449 (b) 19881
The winner is Peter Kaufeler of London, UK. There were 287 entries.
Worked answer
Solvers will probably approach the problem through the 2-digit prime, but it is more interesting to see how it can be solved through the 3-digit prime, and this approach illuminates why so few 3-digit primes fit the criteria.
Advertisement
No squares end in 3 or 7, and no 3-digit primes end in 5, so the 3-digit prime must end in 1 or 9.
All squares that end in 1 or 9 have an even penultimate digit.
In addition, those that end in 01, 09, 41, 49, 81 and 89 also have even antepenultimate digits, and those that end in 21, 29, 61 and 69 have odd antipenultimate digits.
This means that there are only 14 3-digit primes that can end in perfect squares.
The required ending appears once in every 125 squares, these being the squares of x, (250-x), (250 + x)…
The 5-digit squares are squares of numbers between 101 and 313, so that either one or two 5-digit squares have any given 3-digit ending.
- 241: 29241 (171²)
- 281: 25281 (159²)
- 401: 40401 (201²), 89401 (299²)
- 409: 23409 (153²)
- 449: 11449 (107²), 20449 (143²)
- 521: 44521 (211²), 83521 (289²)
- 569: 26569 (163²)
- 601: 39601 (199²), 90601 (301²)
- 641: 14641 (121²), 16641 (129²)
- 761: 32761 (181²)
- 769: 12769 (113²), 18769 (137²)
- 809: 38809 (197²), 91809 (303²)
- 881: 11881 (109²), 19881 (141²)
- 929: 29929 (173²)
So there are only eight 5-digit squares that consist of a 2-digit prime followed by a 3-digit prime, neither prime starting with 0: 11449, 11881, 19881, 23409, 29241, 29929, 83521, 89401.
Of these, only 11881 and 19881 have the same 3-digit ending, and of these two only 11881 provides another square that starts with the same two digits (11449).
So I found 11881, Harry found 11449 and Tom found 19881.


