Ask if the locust can jump to any integer point on the plane after a finite number of hops if: $1) N = 20 $ $2) N = 2017 $ On the coordinate plane there is a locust at coordinate
$(0,0)$. With N being a given positive integer, the locust can jump from integer point $A$ to integer point B if the length $AB$ is equal to $N$. Ask if the locust can jump to any integer point on the plane after a finite number of hops if:
$1) N = 20 $
$2) N = 2017 $
Here is all i did :
$ 1)N=20$
Assuming the locust is at $A(x,y)$ and can move to $B(p,q)$ , then we have  $\sqrt{(x-p)^2+(y-q)^2} = 20 $
$\Rightarrow (x-p)^2+(y-q)^2=400$
Since a square is a perfect square, it leaves only $0$ or $1$ when divided by $4$ , and $4|400$ $\Rightarrow 2|(x-p)$ and $2|(y-q) $
$\Rightarrow $If the locust starts from $(0,0)$ then it can only move to a maximum of all points $(a,b)$ such that $a$ and $b$ are even
So the locust cannot move to all integer points on the plane
$2)N=2017 $
We only need to show that the locust can jump to points $(0,-1)$ and $(0,1)$ after a finite number of jumps
We have a Pitago triad analysis : $2017^2 = 1855^2+792^2$
So to get to the point $(0,1)$, the locust has walked $x_1$ steps with value $1855$ and $x_2$ steps with value $792$ on the horizontal axis, walked $y_1$ steps with value $1855$ and $y_2$ steps with value $792$ on the vertical axis of the coordinate system
$\Rightarrow 1855x_1 + 792x_2 = 0$ and $1855y_1 + 792 y_2 = 0$
So I need to show whether the other system of equations has no solution or exists. But I have no idea at all. Looking forward to getting help from everyone. Thanks very much !
 A: $2017$ is a prime of the form $4k+1$, hence it can be represented as a sum of two squares in a essentially unique way, i.e. $\color{red}{792}^2+\color{green}{1855}^2$. By combining two suitable jumps we can move by $\pm 2\cdot 792$ units or $\pm 2\cdot 1855$ units along the horizontal or vertical direction. Since $792$ and $1855$ are coprime, by Bézout's identity we can reach any point of the plane of the form $(2m,2n)$, via $(0,0)\stackrel{\text{hor}}{\longrightarrow}(2m,0)\stackrel{\text{vert}}{\longrightarrow}(2m,2n)$. With an extra jump we can reach any point of the plane of the form $(2m+1,2n)$ or $(2m,2n+1)$. With an extra jump we can reach any point of the plane of the form $(2m+1,2n+1)$, too.
We can also use a fact from graph theory: in any sufficiently large square chessboard there is a closed knight tour (see Schwenk). Standard knights move via $(\pm 2,\pm 1)$ or $(\pm 1,\pm 2)$ while our epic knight moves via $(\pm 1855,\pm 792)$ or $(\pm 792, \pm 1855)$, but since $\gcd(792,1855)=1$ and $1855+792$ is odd this does not affect the statement.
A: $2017,1855,792$ are coprime and of different parities so the answer to (2) is going to be yes
For example,

*

*if you start at $(0,0)$, take a step $(+1855,+792)$ and another $(-1855,+792)$ you end up at $(0,1584)$ which is coprime to $2017$.


*So repeating this many times and then taking many steps of $(0,-2017)$, you can get to $(0,1649\times 1584 - 1295 \times 207)=(0,1)$,


*and you can then get to any other point by at least combinations of this and its rotations (and probably more quickly by other routes).
