Maths Olympiad Prep

Library / /14 of 27

Number theory Difficulty 5.7 AIME, harder Prove it Brazil

We call a number pal if it doesn't have a zero digit and the sum of the squares of the digits is a perfect square. For example, 21155222115522 is pal (because 22+12+12+52+52+22+22=822^2 + 1^2 + 1^2 + 5^2 + 5^2 + 2^2 + 2^2 = 8^2) but 304304 and 1212 are not pal.

a. What is the greatest two-digit pal number?

b. Does there exist a 20112011-digit pal number?

Solution

a. First notice that 8686 is pal. Then it's not hard to check by hand that every number from 8787 to 9999 is not pal.

b. The answer is yes. First consider the 20112011-digit number 11111\ldots1. The sum of its digits is 20112011. The smallest perfect square greater than 20112011 is 452=202545^2 = 2025. Since 20252011=142025 - 2011 = 14 and 14=2(2212)+(3212)14 = 2 \cdot (2^2 - 1^2) + (3^2 - 1^2), we can exchange two 11s by two 22s and one 11 by one 33. So we obtain the pal number 1112311\ldots123.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.