## Task A-3.5.

How many four-digit numbers divisible by 7 do not contain the digits 1, 2, or 7 in their decimal representation?
## Solution.

We have seven digits available: $0,3,4,5,6,8$ and 9.

The first digit can be chosen in 6 ways (any digit except zero).

The second and third digits can each be chosen in 7 ways.

Let the first three chosen digits form a three-digit number $n$. The last digit $y$ for the desired four-digit number $10 n+y$ can always be chosen in exactly one way. Indeed, since all seven digits we have available give different remainders when divided by 7, exactly one of the numbers

$$
10 n+0, \quad 10 n+3, \quad 10 n+4, \quad 10 n+5, \quad 10 n+6, \quad 10 n+8, \quad 10 n+9
$$

is divisible by 7, regardless of the number $n$.

Therefore, the total number of such numbers is $6 \cdot 7 \cdot 7 \cdot 1=294$.