10.3. The integer 23713 has the following two properties:

(1) any two adjacent digits form a prime two-digit number,

(2) all these prime two-digit numbers are pairwise distinct.

Find the largest of all integers with properties (1) and (2).
Answer: 617371311979.

Solution. Since even digits and the digit 5 can only be in the highest place (and only one of these digits can form a single prime number), and the remaining prime two-digit numbers are $11, 13, 17, 19, 31, 37, 71, 73, 79$, 97, the maximum number of digits in the desired number is 12. In the desired number, the numbers 19, 79, 97 will only appear if the number formed by the last four digits is 1979. The digit 7, besides the numbers 97 and 79, appears in four other numbers, which means the digit 7 must appear in the desired number two more times, and not in the second position from the left. In one case, the neighbors of the digit 7 are two 1s, and in the other case, two 3s. There are also four numbers with the digit 3. Therefore, the digit 3 cannot be in the second position from the left either. Consequently, the digit in this position must be 1. Then, the maximum desired number should start with 6. The remaining digits can be easily selected. The maximum number is 617371311979.

![](https://cdn.mathpix.com/cropped/2024_05_06_1ed79dc155327fe2f18bg-1.jpg?height=46&width=1673&top_left_y=2427&top_left_x=150)
twelve - $\underline{2 \text { points. }}$