I am thinking of a four-digit number, each digit of which is different. When I strike out the last two digits in this number, I get a prime number. Similarly, I get a prime number if I strike out the second and fourth digits, and even if I strike out the middle two digits. However, the number I am thinking of is not a prime number - it can be divided by three without a remainder. There are several numbers with these properties, but the one I am thinking of is the largest of them. Which number am I thinking of? (M. Petrová)
We are looking for a number in the form $\overline{a b c d}$ (digits $a, b, c, d$ are different). According to the problem, $\overline{a b}$ is a prime number, as well as $\overline{a c}$ and $\overline{a d}$. We are therefore looking for three different two-digit prime numbers that start with the same digit (i.e., the tens place digit is the same). From tables, we can determine which triplets are possible:

- 1st triplet: $13,17,19$, digit $a=1$,
- 2nd triplet: $41,43,47$, digit $a=4$,
- 3rd triplet: $71,73,79$, digit $a=7$.

For each triplet, we will determine whether a number can be formed from the relevant digits that is divisible by three:

- 3rd triplet: digits $7,1,3,9$, digit sum 20 - since the digit sum is not divisible by three, neither is any number formed from these digits (in any order) divisible by three.
- 2nd triplet: digits $4,1,3,7$, digit sum 15 - since the digit sum is divisible by three, any number formed from these digits (in any order) is also divisible by three.
- 1st triplet: digits $1,3,7,9$, digit sum 20 - since the digit sum is not divisible by three, neither is any number formed from these digits (in any order) divisible by three.

Only the prime numbers from the second triplet meet the criteria. The first digit of the four-digit number we are looking for is 4, because the prime numbers start with 4. The other digits will be arranged from the largest to the smallest to get the largest number. The number we are looking for is 4731.

Note. The solver does not have to check the divisibility by three for the entire triplet at once (i.e., using the divisibility rule). They can also form all numbers from the found digits (i.e., swap the digits in the hundreds, tens, and units places; the digit in the thousands place is uniquely determined), sort them by size from the largest to the smallest, and check one by one whether they can be divided by three without a remainder.

Evaluation. 2 points for listing the three triplets of prime numbers (2 points should also be awarded if the solver immediately started checking the divisibility by three for the relevant triplets, and thus did not look for the triplet 13, 17, 19 after finding the triplet 41, 43, 47); 3 points for rejecting the triplets 71, 73, 79 and 13, 17, 19 for not meeting the divisibility condition (3 points should also be awarded if the solver did not check the triplet 13, 17, 19 after finding the suitable triplet 41, 43, 47); 1 point for finding the correct result 4731.