2. How many six-digit numbers of the form $\overline{a b c a c b}$ are divisible by 23?
IV /2. The six-digit number $\overline{a b c a c b}$ can be written as

$$
\begin{gathered}
x=100100 a+10001 b+1010 c=23 \cdot(4352 a+434 b+43 c)+4 a+19 b+21 c= \\
=23 \cdot(4352 a+435 b+44 c)+2(2 a-2 b-c)
\end{gathered}
$$

This number is divisible by 23 exactly when the value of the expression $2 a-2 b-c$ is divisible by 23. Since $a, b$, and $c$ are digits and $a \neq 0$, we have $-25 \leq 2 a-2 b-c \leq 18$. The value of the expression $2 a-2 b-c$ is divisible by 23 only if it is equal to 0 or -23.

In the first case, $c=2(a-b)$, so $4 \geq a-b \geq 0$ or $4+b \geq a \geq b$. For $b=0$, we have four options for $a$, for $5 \geq b \geq 1$ we can choose $a$ in 5 ways, for $b=6$ there are 4 options, for $b=7$ there are 3, for $b=8$ there are 2, and for $b=9$ there is one option. Thus, we have a total of $4+5 \cdot 5+4+3+2+1=39$ numbers.

In the second case, $2 a-2 b-c=-23$. If $7 \geq b$, then $23=2 \cdot 7+9 \geq 2 b+c=23+2 a$, so $a=0$, which is not possible. For $b=8$, we get $c=7+2 a$ and the only solution is $a=1$ and $c=9$. For $b=9$, we have $c=5+2 a$, from which we get two possibilities, namely $a=1, c=7$ and $a=2, c=9$. In the second case, we thus have 3 possibilities.

The total number of six-digit numbers with the given properties is $39+3=42$.

The conditions that the digits $a, b$, and $c$ (2a-2b-c=0 or -23 or the analogous condition) must satisfy 2 points

![](https://cdn.mathpix.com/cropped/2024_06_07_5a4348e8f3c4edef190ag-10.jpg?height=51&width=1694&top_left_y=2553&top_left_x=181)
Listing all possibilities in the case $2 a-2 b-c=-23 \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots . \ldots . \ldots . \ldots . \ldots . \ldots . \ldots$ points