8.5. Find all numbers of the form $22 \ldots 2$ that can be represented as the sum of two perfect squares.
Answer: 2.

Solution. Let $22 \ldots 2=a^{2}+b^{2}$ for some integers $a$ and $b$.

If the numbers $a$ and $b$ are even, then the sum of their squares is divisible by 4, but the number $22 \ldots 2$ is not.

Thus, the numbers $a$ and $b$ can only be odd:

$$
a=2 k+1, b=2 l+1(k, l \in Z)
$$

Therefore, the sum

$$
a^{2}+b^{2}=(2 k+1)^{2}+(2 l+1)^{2}=4 k(k+1)+4 l(l+1)+2
$$

when divided by 8 leaves a remainder of 2.

On the other hand, among the numbers of the form 222... 2, only the number 2 leaves a remainder of 2 when divided by 8, since if the number of twos in this number is greater than 1, then

$22 \ldots 2=22 \ldots 2200+22$, in which the first term of the obtained sum is divisible by 8, and the second term leaves a remainder of 6 when divided by 8.

Comments on evaluation. It is shown that the numbers $a$ and $b$ can only be odd - 2 points.