Can the numbers $1, 2, \ldots, 9$ be written around the circumference of a circle in such a way that the sum of any two adjacent numbers is not divisible by 3, 5, or 7?
Let's write down the neighbors of the numbers ranging from 1 to 9 that satisfy the given conditions. The number 1 cannot have as neighbors the numbers that complement it to 3, 6, or 9, which are 2, 5, and 8. Similarly, for 5 and 10, and for 7, the complements are 4, 9, and 6, respectively. Therefore,

1 can be neighbors with $\quad 3,7$

Similarly, we find that

2 can be neighbors with

3 can be neighbors with $\quad 1,5,8$

4 can be neighbors with 7,9

5 can be neighbors with $\quad 3,6,8$

6 can be neighbors with $2,5,7$

7 can be neighbors with $1,4,6,9$,

8 can be neighbors with $\quad 3,5,9$

9 can be neighbors with $2,4,7,8$.

We can see that 1, 2, and 4 each have only two possible neighbors, and these two neighbors sandwich the number, meaning the three numbers must appear in sequence. Let's start the sequence with one of these numbers, for example, 1. The two sandwiching neighbors of 1 are 3 and 7. The number 7 is also a sandwiching neighbor of 4, so 7 must be followed by 4, then 9, which in turn must be followed by 2, and then 6: $3,1,7,4,9,2,6$. With this, we have already placed seven numbers, and no matter which of the numbers with two neighbors we start with, the order of these seven numbers is uniquely determined.

For the remaining 5 and 8, there is only one possible placement left, because on the one hand, the allowed neighbors of 8 do not include the 6 at the end of our sequence, and on the other hand, 5 can be placed between 6 and 8.

Thus, the problem is solvable. (Essentially, there is only one solution. The number written in the first position and the direction of traversal are not significant here.)

![](https://cdn.mathpix.com/cropped/2024_05_02_4609127ce8febb0a461fg-1.jpg?height=648&width=661&top_left_y=1183&top_left_x=713)

Note. We used a diagram to find the correct order. First, we connected the pairs of numbers from $1, 2, \ldots, 9$ that are suitable as neighbors with thin lines. The 26 allowed neighbor pairs in the table above thus resulted in 13 connections. Then, in the vicinity of the numbers with only two connections, we "finalized" a few neighbor pairs with thick lines and arcs, aiming to form a loop of 9 neighbors as required. This fixed six connections, and at the same time, made some additional thin lines unusable: from 7, two lines, from 9, one more, and from 3, one more, were crossed out at both ends. After this, 5 and 8 also had only two usable neighbors each, forming a possible path for writing the numbers in sequence, which closes on itself.