Problem 3. Determine the numbers of the form $\overline{a b c d}$ that simultaneously satisfy the following conditions: a) the sum of the squares of the digits is divisible by 4;

b) the remainder of the division of the number $\overline{a b c d}$ by $c$ is 7.
Solution. The square of a natural number is of the form $4 k$ or $4 k+1 \ldots \ldots \ldots$...................... $\mathbf{p}$ $a^{2}+b^{2}+c^{2}+d^{2}$ is divisible by 4 if $a, b, c, d$ have the same parity ..................... $\mathbf{p}$ From the division theorem with remainder, there exist natural numbers $q$ and $r$ such that $\overline{a b c d}=c \cdot q+7$ and $7<c$,

![](https://cdn.mathpix.com/cropped/2024_06_07_fc27702d722f631f1f86g-2.jpg?height=54&width=1789&top_left_y=1168&top_left_x=125)

If $c=8$, all digits are even and $\overline{a b c d}=8 q+7$, which is impossible because the left side is even, while the right side is odd . .....................................................................1p

If $c=9$, all digits are odd and, since $\overline{a b 9 d}$ gives a remainder of 7 when divided by 9, it follows that $a+b+d+9$ is an even number that gives a remainder of 7 when divided by 9; it is obtained that $a+b+d$ can be 7

![](https://cdn.mathpix.com/cropped/2024_06_07_fc27702d722f631f1f86g-2.jpg?height=51&width=1786&top_left_y=1422&top_left_x=126)

For $a+b+d=7$ the solutions obtained are 1393, 3193, 3391, 1195, 1591 and $5191 \ldots \ldots \ldots \ldots \ldots . \ldots$. 1 p

For $a+b+d=25$ the solutions obtained are 7999, 9799 and $9997 \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots$ 1p