Problem

Source: JBMO 2014, pr 4

Tags: floor function, modular arithmetic, limit, logarithms, combinatorics solved, combinatorics



For a positive integer $n$, two payers $A$ and $B$ play the following game: Given a pile of $s$ stones, the players take turn alternatively with $A$ 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 $n$ stones. The winner is the one who takes the last stone. Assuming both $A$ and $B$ play perfectly, for how many values of $s$ the player $A$ cannot win?