Proof that square of an $\sqrt{2 - 4q}$ is not an integer

Hint : If $n$ is some integer, then

$n=0 \mod{4} \implies n^2=0 \mod{4} $

$n=1 \mod{4} \implies n^2=1 \mod{4} $

$n=2 \mod{4} \implies n^2=0 \mod{4} $

$n=3 \mod{4} \implies n^2=1 \mod{4} $


Apart from @Vincent's answer, here's another way of looking at it $$x=\sqrt{2-4q}$$ Clearly, $2-4q$ is divisible by $2$ but not by $4$ for any integer $q$. Thus, it cannot be a perfect square.


Let $x \in \Bbb Z$ be a solution. Of course $x$ must be even, since an odd $x$ would make $2-x^2$ odd too.

Now let $x=2y$, then $2-x^2=2-4y^2=2(1-2y^2)$. But $1-2y^2$ is odd, so $4$ can't divide $2-x^2$.

This shows there doesn't exist solutions for that equation in $\Bbb Z$