Given a number say $x$, how to check if it can become hypotenuse of right angle triangle and other sides must be integer
For example:
$5$ it can be hypotenuse as its other sides $3$ & $4$ are integers.
$13$ it can also hypotenuse as its other sides $12$ & $5$ are integers.
$12$ can't be hypotenuse because other two sides can't be integers.
An integer number $N>0$ can be the hypothenuse of a right angled triangle with integer side lengths if and only if it has a prime factor $p \equiv 1 (4)$ (i.e. $p$ is of the form $4k+1$ with integer $k$).
The proof outline is as follows: