<s>[INST] if $5\nmid a$ or $5\nmid b$, then $5\nmid a^2-2b^2$. I have  a homework as follow:
if $5\nmid a$ or $5\nmid b$, then $5\nmid a^2-2b^2$.
Please help to prove it.
EDIT: MY ATTEMPT
Suppose that $5\mid a^2-2b^2$, then $a^2-2b^2=5n$,where $n\in Z$,
then $a^2-2b^2=(a+\sqrt2b)(a-\sqrt2b)=5n$, 
Since 5 is a prime number, we get that $5\mid (a+\sqrt2b)$or $5\mid (a-\sqrt2b)$,
If $5\mid (a+\sqrt2b)$, then $5\mid a$ and $5\mid b$, contradiction.
If $5\mid (a-\sqrt2b)$, then $5\mid a$ and $5\mid b$, contradiction.
Thus $5\nmid a^2-2b^2$.
 [/INST] This is probably what Bernard intended.
The non-zero quadratic residues mod $5$ are $1$ and $4$. Plugging these into $a^2-2b^2$ gives
$$
\begin{array}{c|ccc}
&1&4&a^2\\\hline
1&4&2\\
4&3&1\\
b^2
\end{array}
$$
Since none of the entries are $0$, we get that $a^2-2b^2\not\equiv0\pmod5$ if neither $a$ nor $b$ are $0\pmod5$.
</s>