Joe and Penny play a game. Initially there are 5000 stones in a pile, and the two players remove stones from the pile by making a sequence of moves. On the th move, any number of stones between 1 and inclusive may be removed. Joe makes the odd-numbered moves and Penny makes the even-numbered moves. The player who removes the very last stone is the winner. Who wins if both players play perfectly?
, 2023
Solution
If on move , Joe removes stones, then on move , Penny can remove either or stones (both of which are in the valid range). Thus Penny can ensure that the two moves remove either or stones.
If on occasions, Penny chooses to ensure stones are removed then after move , there will be
stones removed. Thus after move , Penny can ensure there are any number between and stones removed.
Setting we see that after move , Penny can ensure stones have been removed and so there are 140 stones remaining. Joe will leave between 1 and 139 stones which Penny can remove on her turn.
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.