if $5\nmid a$ or $5\nmid b$, then $5\nmid a^2-2b^2$.

89 Views Asked by At

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$.

2

There are 2 best solutions below

2
On

You just have to make a table for the function $a^2-5b^2$ in $\mathbf Z/5\mathbf Z$ above the horizontal line, the possible values for $a^2$; to the left of the vertical line, those for $b^2$): $$\begin{array}{r|rrr} &0&1&-1\\ \hline 0&0&1&-1\\1&-2&-1&2\\-1&2&-2&1 \end{array}$$ which shows the only case with $a^2-5b^2\equiv 0\mod5$ is when $a\equiv b\equiv 0\mod5$.

0
On

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$.