Alice and Bob play a game with a pile of $n$ pebbles. They take turns, with Alice going first. On their turn, a player can remove any number of stones from the pile which is a proper divisor of the size of the pile on that turn. If a player reduces the pile to a single pebble, they win.
For which values of $n$ does Alice win under optimal play?
For example, if $n=12$, Alice's first move could be to remove $1,2,3,4$ or $6$ stones. Suppose she removes $2$ (this is a legal move, not necessarily an optimal one). Bob now faces a pile of $10$ pebbles, from which he can remove $1,2$ or $5$ stones.