Problem

Source: 1985, Day 1, Problem 2

Tags: number theory, greatest common divisor, relatively prime, Coloring, combinatorics, IMO, IMO 1985



Let $n$ and $k$ be relatively prime positive integers with $k<n$. Each number in the set $M=\{1,2,3,\ldots,n-1\}$ is colored either blue or white. For each $i$ in $M$, both $i$ and $n-i$ have the same color. For each $i\ne k$ in $M$ both $i$ and $|i-k|$ have the same color. Prove that all numbers in $M$ must have the same color.