MathDB
GAME

Source: JBMO 2014, pr 4

June 23, 2014
floor functionmodular arithmeticlimitlogarithmscombinatorics solvedcombinatorics

Problem Statement

For a positive integer nn, two payers AA and BB play the following game: Given a pile of ss stones, the players take turn alternatively with AA going first. On each turn the player is allowed to take either one stone, or a prime number of stones, or a positive multiple of nn stones. The winner is the one who takes the last stone. Assuming both AA and BB play perfectly, for how many values of ss the player AA cannot win?