
1. Let $n$ be a positive integer. Tom and Jerry play a game on a board consisting of a row of 2018 cells. Initially, Jerry places a piece at some cell. In each subsequent step, Tom says an integer from the interval $[1, n]$ and Jerry moves the piece by the said number of cells, by his choice either to the left or to the right. Tom wins whenever Jerry cannot make a move. Find the smallest $n$ for which Tom can pick numbers such that he wins after a finite number of moves.

(Josef Tkadlec)


Another solution. We describe another strategy for Tom when $n=1010$. This strategy forces a win in 3 steps. As before, label the cells 1,2, . , 2018 left to right and denote the current position of the piece by $k$. If $k \in\{1009,1010\}$, Tom says 1010 and wins immediately. If $k \leqslant 504$, Tom says $1009-k$. Since $k-(1009-k)<0$, Jerry has to move right and loses in the next step. Likewise, if $k \geqslant 1515$, Tom says $k-1010$ and forces Jerry to move to 1010 and lose in the next step. Next, if $505 \leqslant k \leqslant 1008$, Tom says 1010 , which forces Jerry to move right and place the piece at a cell $k^{\prime}$ satisfying $1515 \leqslant k^{\prime} \leqslant 2018$, from which Tom can force a win in two steps as described above. Finally, if $1011 \leqslant k \leqslant 1514$, Tom says 1010, which forces Jerry to move left to a cell $k^{\prime}$ satisfying $1 \leqslant k^{\prime} \leqslant 504$. Tom again wins in two more steps.
