Find all seven-digit numbers that contain each of the digits 0 to 6 exactly once and for which the first and last two-digit numbers are divisible by 2, the first and last three-digit numbers are divisible by 3, the first and last four-digit numbers are divisible by 4, the first and last five-digit numbers are divisible by 5, and the first and last six-digit numbers are divisible by 6.

(M. Mach)
The last digit must be even, since the last two-digit number is divisible by two. For the last five-digit number to be divisible by five, the last digit must be 0 or 5. Of these, the even one is 0. The first five-digit number is also divisible by five, so for the fifth position, the digit 5 remains. So far, we have the number determined as follows:

$$
* * * * 5 * 0 \text{. }
$$

The last three-digit number is divisible by three, so its digit sum must be divisible by three. Thus, we can fill in 4 or 1 on the second-to-last position. For the last four-digit number to be divisible by four, the last two-digit number must be divisible by four. Therefore, the second-to-last position can only be 4, not 1. Now we have the number determined as follows:

$$
* * * * 540 \text{. }
$$

Since the first two-digit number is divisible by two and the first four-digit number is divisible by four, the digits in the second and fourth positions must be even. Therefore, the digits in the first and third positions will be odd. From the knowledge that the last six-digit number is divisible by six, we deduce the first digit. A number is divisible by six if and only if it is divisible by both two and three. The first digit must be chosen so that the digit sum of the rest of the number is divisible by three. The sum of the digits from 0 to 6 is 21, so the first digit can be 3 or 6, of which the odd one is 3. The third position must be the remaining odd digit, which is 1. So far, we have determined the number as follows:

$$
3 * 1 * 540
$$

It remains to fill in the digits 2 and 6. To make the first three-digit number divisible by three, we place the digit 2 in the second position. The sought number can only be

$$
3216540 \text{. }
$$

Finally, we must verify that we have not overlooked any of the requirements in the problem statement. It remains to verify that the first four-digit number is divisible by four and the first six-digit number is divisible by six. This is satisfied, so the sought number is 3216540.

Evaluation. 1 point for correctly determining and justifying the position of five digits; 1 point for the final number. Finding the number without justifying individual steps is rated 2 points.