Problem

Source: IMO Shortlist 2013, Number Theory #5

Tags: induction, number theory, game, IMO Shortlist



Fix an integer $k>2$. Two players, called Ana and Banana, play the following game of numbers. Initially, some integer $n \ge k$ gets written on the blackboard. Then they take moves in turn, with Ana beginning. A player making a move erases the number $m$ just written on the blackboard and replaces it by some number $m'$ with $k \le m' < m$ that is coprime to $m$. The first player who cannot move anymore loses. An integer $n \ge k $ is called good if Banana has a winning strategy when the initial number is $n$, and bad otherwise. Consider two integers $n,n' \ge k$ with the property that each prime number $p \le k$ divides $n$ if and only if it divides $n'$. Prove that either both $n$ and $n'$ are good or both are bad.