Maths Olympiad Prep

Library / /9 of 27

Number theory Difficulty 5.4 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, 122122 and 3434 are *pal* but 304304 and 1212 are not *pal*. Prove that there exists a *pal* number with nn digits, n>1n > 1.

Solution

Consider the number 555n times\underbrace{55\dots5}_{n \text{ times}}. The sum of the squares of its digits is n52=25nn \cdot 5^2 = 25n. We can exchange any two fives by one three and one four, so the sum of the squares decreases by 525^2, until we run out of fives. So we can get any sum from 25n/225 \cdot \lfloor n/2 \rfloor and 25n25 \cdot n. So it suffices to show that there is an integer kk such that n2k2n\frac{n}{2} \le k^2 \le n. Choose kk such that k2n<(k+1)2k^2 \le n < (k+1)^2. Suppose k2<n2k^2 < \frac{n}{2}. Then n>2k2n > 2k^2, and (k+1)2>n>2k2    (k+1)22k2+2    k22k+10    (k1)20(k+1)^2 > n > 2k^2 \implies (k+1)^2 \ge 2k^2+2 \iff k^2 - 2k + 1 \le 0 \iff (k-1)^2 \le 0, which is false except for k=1k=1, or 2<n<42 < n < 4, that is, n=3n=3. But the statement of the problem itself gives an example with nn digits: 122122.

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.