Maths Olympiad Prep

Library / /594 of 740

, 2019

Combinatorics Difficulty 5.3 AIME, harder Prove it United States

Problem:

Two players play a game, starting with a pile of NN tokens. On each player's turn, they must remove 2n2^{n} tokens from the pile for some nonnegative integer nn. If a player cannot make a move, they lose. For how many NN between 1 and 2019 (inclusive) does the first player have a winning strategy?

Solution

Solution:

The first player has a winning strategy if and only if NN is not a multiple of 3. We show this by induction on NN. If N=0N=0, then the first player loses.

If NN is a multiple of 3, then N2nN-2^{n} is never a multiple of 3 for any nn, so the second player has a winning strategy.

If NN is not a multiple of 3, the first player can remove either 1 or 2 coins to get the number of coins in the pile down to a multiple of 3, so the first player will always win.

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.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.