MathDB
Game on the board to be divisible by 1999

Source: 239 2001 J3

May 20, 2020
number theory

Problem Statement

The numbers 1,2,,19991, 2, \dots, 1999 are written on the board. Two players take turn choosing a,ba,b from the board and erasing them then writing one of abab, a+ba+b, aba-b. The first player wants the last number on the board to be divisible by 19991999, the second player want to stop him. Determine the winner.