Proof that square of an $\sqrt{2 - 4q}$ is not an integer I want to find a solution for $x$ such that
$(2-x^2) = 0 \mod{4}$
If that is true, I can write 
$(2 - x^2) = 4q$
for some integer $q$. We solve for $x$ and get the expression
$x = \sqrt{2 - 4q}$.
I can choose $q$ myself, but no matter what $q$ I choose, I always get $x$ equal to a decimal number. As long as $x$ is a decimal number, $(2-x^2) \mod{4}$ can not be equal to $0$ and so it seems like the equation has no solution. But in order to say this for sure I need to prove that $x$ can not be an integer for any value of $q$. How do I do that?
 A: This answer builds completely on GoodDeed's excellent answer, but I think going into further detail is useful.
Consider that
$$x=\sqrt{2-4q} = \sqrt{2 (1 - 2q)} = \sqrt 2 \sqrt{1 - 2q}$$
$1 - 2 q$ is odd for all $q \in \Bbb Z$. This means that $x$ must be irrational because $\sqrt{1 - 2q}$ will never have a factor of $\sqrt 2$.
It may be worth noting that while $x$ cannot be an integer value, your question doesn't make clear why you need to exclude these solutions. An irrational $x$ is a valid solution, unless there are other constraints on it you're not mentioning.
A: 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} $
A: 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.
A: 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$
