MathDB
removing coins from a pile

Source: Serbia & Montenegro 2001 1st Grade P4

June 1, 2021
combinatoricsgame

Problem Statement

There are nn coins in the pile. Two players play a game by alternately performing a move. A move consists of taking 5,75,7 or 1111 coins away from the pile. The player unable to perform a move loses the game. Which player - the one playing first or second - has the winning strategy if:
(a) n=2001n=2001; (b) n=5000n=5000?