Would someone be willing to verify this proof by contradiction? NB: This theorem has appeared on MSE before, but my proof differs.
Theorem: $\forall n \in \mathbb{Z}, 4\nmid(n^2+2)$
Suppose, for the sake of contradiction, that the above theorem is false. Then, $\exists n \in \mathbb{Z}, 4|(n^2+2)$.
$4|(n^2+2) \Longrightarrow 4x=(n^2+2), x \in \mathbb{Z}$.
It follows that $4x-2 = n^2 \Longrightarrow \sqrt{2}\sqrt{2x-1} = n$. $\sqrt{2}$ is irrational, so for the product $\sqrt{2}\sqrt{2x-1}$ to be an integer, the term $\sqrt{2x-1}$ must contain a $\sqrt{2}$ as one of its factors. Edit to add for clarity: In other words, for a product $\sqrt{2}a$ to be integer, we need to be able to state $a = \sqrt{2}b$, so $\sqrt{2}\sqrt{2}b \Longrightarrow 2b$. (Or does this argument not hold water?)
However, $2x-1$ is an odd number by definition, and therefore cannot have 2 as a factor. Therefore, $n \notin \mathbb{Z}$, and we have a contradiction.
The $\sqrt 2$ as a factor argument needs help. Try using cases.
If $n$ is even then $n = 2k$ for some $k$ and $n^2 + 2 = 4k^2 + 2$.
If $n$ is odd then $n = 2k+1$ for some $k$ and $n^2 + 2 = 4k^2 + 4k + 3$.
I don't think either of these is a multiple of $4$.