Winning strategy in a number theory game

164 Views Asked by At

Two people play a game, lets call them A and B. There are $n$ stones on a table and players start to remove them. They can remove $p-1$ stones at once where $p$ is a prime number. Whoever takes the last stone, wins. Show that if player A starts then player B has a winning strategy for infinite number of $n$.

My thoughts so far:

It seems that whoever can take stones such that 3 stones remain will win. I haven't figured out when it is impossible for player A to do so. Player B needs to avoid a position where there are $p+2$ stones remaining. Any ideas on how to go about this?

1

There are 1 best solutions below

5
On

Assume $B$ can only win finitely many starting positions. We know there is at least one, which is $3$. There is a largest one, call it $N$. Now consider the starting position $(N+1)!+N$. There are no primes in the range $[(N+1)!+2,(N+1)!+N+1]$, so $A$ must leave a position larger than $N$. We assumed all numbers larger than $N$ were wins for the first player, so $B$ can use the first player strategy and win. This violates our assumption that $N$ was the largest second player win.