MathDB
Token Game

Source: KöMaL A. 812

March 23, 2022
komalgamewinning strategycombinatorics

Problem Statement

Two players play the following game: there are two heaps of tokens, and they take turns to pick some tokens from them. The winner of the game is the player who takes away the last token. If the number of tokens in the two heaps are AA and BB at a given moment, the player whose turn it is can take away a number of tokens that is a multiple of AA or a multiple of BB from one of the heaps.
Find those pair of integers (k,n)(k,n) for which the second player has a winning strategy, if the initial number of tokens is kk in the first heap and nn in the second heap.
Proposed by Dömötör Pálvölgyi, Budapest