# Modified Nim

Probability Level 5

Two players play a game starting with a pile of $N\geq 2$ stones. Players alternate turns, removing stones from the pile. On the first turn, the first player may remove any number of stones from $1$ to $N-1.$ On any subsequent turn, the player can remove at most twice as many stones as were removed on the previous turn. The player who removes the last stone is the winner. Determine the number of starting pile sizes between $2$ and $1000$ (inclusive) for which the first player has a winning strategy.

Details and assumptions

You may use the fact that $2^{10} = 1024$.

×