MathDB
Stone swap

Source: KJMO 2023 P5

November 4, 2023
combinatorics

Problem Statement

For a positive integer n(5)n(\geq 5), there are nn white stones and nn black stones (total 2n2n stones) lined up in a row. The first nn stones from the left are white, and the next nn 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(2n5)k (\leq 2n - 5), and swap kk-th stone and (k+5)(k+5)-th stone from the left.
Find all positive integers nn such that we can make first nn stones to be black and the next nn stones to be white in finite number of operations.