5. What is the maximum number of two-digit numbers that can be written in a row so that any two adjacent numbers are not coprime, while any two non-adjacent numbers are coprime?
Answer: 10. Solution: Ten numbers can be written: 11, 77, 91, 65, 85, 51, 57, 38, 46, 23. Suppose we managed to write 11 such numbers. Let's list the common divisor, different from 1, for each pair of adjacent numbers. This will result in 10 numbers, any two of which are coprime. All these numbers are either single-digit or double-digit. But it is impossible to choose more than four single-digit numbers, different from 1, any two of which are coprime. Therefore, in the constructed sequence of 10 numbers, there will be no fewer than six double-digit numbers. This means that some two of them will be adjacent, and some number in the original sequence will be divisible by each of them. Since they are coprime, it is also divisible by their product. But a double-digit number cannot be divisible by the product of two double-digit numbers.