MathDB
2016 Team #7

Source:

August 17, 2022
2016team test

Problem Statement

Eddy and Moor play a game with the following rules:
[*] The game begins with a pile of NN stones, where NN is a positive integer. [/*] [*] The 22 players alternate taking turns (e.g. Eddy moves, then Moor moves, then Eddy moves, and so on). [/*] [*] During a player's turn, given aa stones remaining in the pile, the player may remove bb stones from the pile, where gcd(a,b)=1\gcd(a,b)=1 and bab\leq a. [/*] [*] If a player cannot make a move, they lose. [/*]
For example, if Eddy goes first and N=4N=4, then Eddy can remove 33 stones from the pile (since 343\leq4 and gcd(3,4)=1\gcd(3,4)=1), leaving 11 stone in the pile. Moor can then remove 11 stone from the pile (since 111\leq1 and gcd(1,1)=1\gcd(1,1)=1), leaving 00 stones in the pile. Since Eddy cannot remove stones from an empty pile, he cannot make a move, and therefore loses.
Both Eddy and Moor want to win, so they will both always make the best possible move. If Eddy moves first, for how many values of N<2016N<2016 can Eddy win no matter what moves Moor chooses?