Maths Olympiad Prep

Library / /72 of 101

Combinatorics Difficulty 6.7 National olympiad Prove it Estonia

There are nn candies on the table. On every turn, a player eats a number of candies that is greater than 11 and divides the number of candies on the table at the start of the turn, but must leave at least 11 candy on the table. Two players take alternate turns and the player who is unable to make a move loses. Find all positive integers nn for which the first player can always win.

Solution

Define all even numbers which are not odd powers of 22 as good and the rest of the positive integers as bad. We show that the player before whose turn the number of candies is good has a move which yields in a bad number of candies, whereas the player before whose turn the number of candies is bad either has lost or is forced to leave a good number of candies on the table. As the number of candies is reduced in each move, the starting player wins if, initially the number of candies on the table is good.

A player before whose turn the number of candies is even but not a power of 22 can eat the number of candies equal to its odd factor different from 11. After that, the number of candies on the table is odd, i.e. bad. If before the turn the number of candies is equal to an even power of 22, one can eat exactly half of the candies, leaving an odd power of 22 candies on the table, i.e. a bad number.

On the other hand, if the number of candies before the turn is odd, the player can only choose odd factors. This yields in an even number of candies left on the table. Furthermore, the number of candies left on the table is divisible by the number of candies taken from the table which is odd, hence, the number of candies cannot be a power of 22. Therefore, the number of candies left on the table is good. However, if the number of candies before the turn is equal to an odd power of 22, the player can only choose even factors, which results in an even number of candies left on the table. Furthermore, the rules do not allow eating more than half of the candies. Therefore, the number of candies left of the table can only be a power of 22 if its exponent is less by 11 than before the move. This would be an even power of 22 which is also a good number.

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 and solution reproduced as published; topic and difficulty added by this site.