Number theoryDifficulty 5.4AIME, harderProve itBrazil
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, 122 and 34 are *pal* but 304 and 12 are not *pal*. Prove that there exists a *pal* number with n digits, n>1.
Solution
Consider the number n times55…5. The sum of the squares of its digits is n⋅52=25n. We can exchange any two fives by one three and one four, so the sum of the squares decreases by 52, until we run out of fives. So we can get any sum from 25⋅⌊n/2⌋ and 25⋅n. So it suffices to show that there is an integer k such that 2n≤k2≤n. Choose k such that k2≤n<(k+1)2. Suppose k2<2n. Then n>2k2, and (k+1)2>n>2k2⟹(k+1)2≥2k2+2⟺k2−2k+1≤0⟺(k−1)2≤0, which is false except for k=1, or 2<n<4, that is, n=3. But the statement of the problem itself gives an example with n digits: 122.
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.