Tintarn wrote:
A frog is located on a unit square of an infinite grid oriented according to the cardinal directions. The frog makes moves consisting of jumping either one or two squares in the direction it is facing, and then turning according to the following rules:
i) If the frog jumps one square, it then turns $90^\circ$ to the right;
ii) If the frog jumps two squares, it then turns $90^\circ$ to the left.
Is it possible for the frog to reach the square exactly $2024$ squares north of the initial square after some finite number of moves if it is initially facing:
a) North;
b) East?
Identify the squares with $\mathbb{Z}^2$ is such a way that the frog starts at $(0,0)$ and the squares 2024 units north and east are $(0,2024)$ and $(2024,0)$ respectivly.
The following claim follows easily by induction:
The frog cannot reach squares $(x,y)$ with $2x+y\equiv4\pmod{5}$. If the frog is at a square with $2x+y\equiv0,1,2,3\pmod{5}$ it faces north, east, west, south respectivly.
In particular the frog can not reach $(0,2024)$. This answers part a).
For part b) we note that $(2024,0)$ is reachable by moving $404$ times $1,2,1,1,2,2$ squares and then $1,2,1,1,2,1$ squares.