## Task A-2.2.

A 2021-digit number is written. Each two-digit number formed by two consecutive digits of this number (without changing the order) is divisible by 17 or 23. The unit digit of this number is 7. What is its first digit?
## Solution.

Two-digit multiples of 17 are 17, 34, 51, 68, and 85. Two-digit multiples of 23 are 23, 46, 69, and 92.

If the digit 7 is the last one, the digit before it must be 1. Before the 1 is 5, before the 5 is 8, and before the 8 is necessarily 6. Then, these digits must be preceded by 4, then 3, then 2, then 9, and then 6 again.

The last four digits are $\overline{8517}$, and among the remaining 2017 digits, the block $\overline{92346}$ of five digits repeats 403 times (since $2017=403 \cdot 5+2$).

Before all of this, only two more digits from the block $\overline{92346}$ appear, and these are the digits 4 and 6. Therefore, 4 is the first digit of the written number.

1 point