Exercise 5. A palindrome is a number whose decimal representation does not change if the order of the digits is reversed. For example, 3773 is a palindrome. A four-digit number $\overline{\mathrm{abcd}}$ is said to be balanced if $\mathrm{a}+\mathrm{b}=\mathrm{c}+\mathrm{d}$ (for example, 2736 is balanced). Determine all four-digit balanced numbers that are the sum of two four-digit palindromes.

Note: a palindrome cannot start with a zero. For example, 0770 is not a palindrome.
Solution to Exercise 5 A four-digit palindrome is written in the form $a b b a = 1001 a + 110b$. Since 1001 and 110 are multiples of 11, the sum of two such palindromes is a multiple of 11. Therefore, necessarily, $\mathrm{a}+\mathrm{c}-(\mathrm{b}+\mathrm{d})$ is a multiple of 11. Since it is also the difference of two integers less than 18, we have $a+c-(b+d)=0$ or $a+c-(b+d)= \pm 11$.

If $a+c-(b+d)= \pm 11$, by adding the equation $a+b-c-d=0$, we get $2(a-d)= \pm 11$, which is impossible because 11 is odd. Therefore, $a+c-(b+d)=0$. By adding the equation $\mathrm{a}+\mathrm{b}-\mathrm{c}-\mathrm{d}=0$, we deduce that $2(\mathrm{a}-\mathrm{d})=0$, so $\mathrm{a}=\mathrm{d}$. It follows that $\mathrm{b}=\mathrm{c}$.

The numbers sought are therefore of the form abba. Since they are the sum of two palindromes, we have $2 \leqslant \mathrm{a} \leqslant 9$ and $0 \leqslant \mathrm{~b} \leqslant 9$.

Conversely, such a number is clearly balanced, and it is the sum of the palindromes 1001 and $c b b c$ where $c=a-1$.

## HIGH SCHOOL EXERCISES