Problem

Source: St. Petersburg MO 2000, 9th grade, P5

Tags: combinatorics, Invariants, games



The numbers $1,2,\dots,2000$ are written on the board. Two players are playing a game with alternating moves. A move consists of erasing two number $a,b$ and writing $a^b$. After some time only one number is left. The first player wins, if the numbers last digit is $2$, $7$ or $8$. If not, the second player wins. Who has a winning strategy? Proposed by V. Frank