Problem

Source: KJMO 2023 P5

Tags: combinatorics



For a positive integer $n(\geq 5)$, there are $n$ white stones and $n$ black stones (total $2n$ stones) lined up in a row. The first $n$ stones from the left are white, and the next $n$ stones are black. $$\underbrace{\Circle \Circle \cdots \Circle}_n \underbrace{\CIRCLE \CIRCLE \cdots \CIRCLE}_n $$You can swap the stones by repeating the following operation. (Operation) Choose a positive integer $k (\leq 2n - 5)$, and swap $k$-th stone and $(k+5)$-th stone from the left. Find all positive integers $n$ such that we can make first $n$ stones to be black and the next $n$ stones to be white in finite number of operations.