MathDB
Game with number theory

Source: Brazilian Mathematical Olympiad 2018 - Q3

November 16, 2018
number theoryCombinatorial gamesabstract algebraBrazilian Math OlympiadBrazilian Math Olympiad 2018

Problem Statement

Let kk, nn be fixed positive integers. In a circular table, there are placed pins numbered successively with the numbers 1,2,n1, 2 \dots, n, with 11 and nn neighbors. It is known that pin 11 is golden and the others are white. Arnaldo and Bernaldo play a game, in which a ring is placed initially on one of the pins and at each step it changes position. The game begins with Bernaldo choosing a starting pin for the ring, and the first step consists of the following: Arnaldo chooses a positive integer dd any and Bernaldo moves the ring dd pins clockwise or counterclockwise (positions are considered modulo nn, i.e., pins xx, yy equal if and only if nn divides xyx-y). After that, the ring changes its position according to one of the following rules, to be chosen at every step by Arnaldo:
Rule 1: Arnaldo chooses a positive integer dd and Bernaldo moves the ring dd pins clockwise or counterclockwise.
Rule 2: Arnaldo chooses a direction (clockwise or counterclockwise), and Bernaldo moves the ring in the chosen direction in dd or kdkd pins, where dd is the size of the last displacement performed.
Arnaldo wins if, after a finite number of steps, the ring is moved to the golden pin. Determine, as a function of kk, the values of nn for which Arnaldo has a strategy that guarantees his victory, no matter how Bernaldo plays.