## Task 4 - 300824

Imagine the numbers 1, 2, 3, 4, ..., 9999 written consecutively to form a number $z$.

The beginning of this representation is $z=123456789101112131415 \ldots$; for example, the digit 0 appears at the 11th position, the digit 2 appears at the 2nd position, the 15th position, and at several other positions in $z$.

Which digit stands at the 206788th position of $z$?
Among the written numbers, there are exactly 9 single-digit, exactly $99 - 9 = 90$ two-digit, exactly $999 - 99 = 900$ three-digit, exactly $9999 - 999 = 9000$ four-digit, and exactly $99999 - 9999 = 90000$ five-digit numbers.

In the sequence of digits thus written for $z$, the single-digit numbers occupy the first 9 positions, the two-digit numbers the next $2 \cdot 90 = 180$ positions, the three-digit numbers the next $3 \cdot 900 = 2700$ positions, the four-digit numbers the next $4 \cdot 9000 = 36000$ positions, and the five-digit numbers the next $5 \cdot 90000 = 450000$ positions.

Since the one- to four-digit numbers thus occupy the first $9 + 180 + 2700 + 36000 = 38889$ positions, and the one- to five-digit numbers occupy the positions up to the 488889th position because $38889 + 450000 = 488889$, the digit at the 206788th position of $z$ must, due to $38889 < 206788 < 488889$, be part of one of the written five-digit numbers.

To determine which one, we form the difference $206788 - 38889 = 167899$ and perform the division of 167899 by 5 with a remainder. This gives us that $167899 = 5 \cdot 33579 + 4$, and it follows:

The digit we are looking for is preceded by 33579 five-digit numbers, and it is the fourth digit in the next, i.e., the 33580th five-digit number. Since the five-digit numbers start with the number 10000, the 33580th of them is 43579. Its fourth digit is 7.

Thus, the digit at the 206788th position of $z$ is 7.

Solutions of the II. Round 1990 adopted from [5]

### 5.32.3 III. Round 1990, Class 8