Let x be the number of heads and y the number of tails at each point of the game. The pair (x,y) completely describes the state of the game. Let D(x,y)=x−y. This quantity behaves as follows under each possible move:
a. (x,y)→(y,x) changes D(x,y) to −D(x,y).
b. (x,y)→(3x,3y) changes D(x,y) to 3D(x,y).
c. If y≥4, move (x,y)→(x+4,y−4) changes D(x,y) to D(x,y)+8.
d. If y≥5, move (x,y)→(x+3,y−5) changes D(x,y) to D(x,y)+8.
We will indicate composition of moves using the symbol ∘ so that, for example, (b)∘(a) is the move (a) followed by move (b), which sends (x,y) to (3y,3x), and (b)m is the m-fold composition of (b) sending (x,y) to (3mx,3my). We introduce the following moves:
(c′)=(a)∘(c)∘(a): If x≥4, it sends (x,y) to (x−4,y+4).
(d′)=(a)∘(d)∘(a): If x≥5, it sends (x,y) to (x−3,y+5).
We also define a move (e) which sends (x,y) to (x−1,y−1) if x and y are both positive and one of them is at least 4:
(e)={(d′)∘(c)(d)∘(c′)if x≥1,y≥4if x≥4,y≥1.
Finally, we define moves (f) and (f') as follows:
(f)=(c)∘(e)4: If x≥4 and y≥8, it sends (x,y) to (x,y−8).
(f′)=(c′)∘(e)4: If x≥8 and y≥4, it sends (x,y) to (x−8,y).
To prove that each pair (2024,8n) with n≥0 can be reached during the game, we first apply move (b) k times, where 3k≥a, and then move (e) a number of times to get
(1,1)→(3,3)→(9,9)→⋯→(3k,3k)→(3k−1,3k−1)→⋯→(a,a).
This shows that we can get any pair (a,a) with a≥3. In particular, we can get any pair (8n,8n) with n≥1. If 8n≥2024=8⋅253 we apply move (f′) a number of times to reach (2024,8n) for any n≥253. To reach (2024,8n) for 0≤n<253, we start with (2024,2024) and apply move (f) a suitable number of times. Hence, for any n≥0 we can reach (2024,8n) from (1,1) after a finite number of moves.