Quadratic residues and squares of odd numbers

122 Views Asked by At

I wish to know if $\equiv 1 \text{ (mod) }8$ is a necessary and sufficient condition for an odd square number? If not, does there exist a necessary and sufficient criterion for a number to be an odd square? For example $ 14144 x^2+3872 x +265 $ has a congruence of $ 1 \text{ (mod) }8$ for all $x$ but is never a square. So, I am a bit confused as to whether I am understanding something wrong.

1

There are 1 best solutions below

3
On

All odd squares are $\equiv 1 \bmod 8$ because $$(2m+1)^2=8\cdot \frac {m(m+1)}2+1$$

So the condition is necessary.

$17\equiv 1 \bmod 8$, but $17$ is not an integer square. So the condition is not sufficient.

A sufficient condition would be that $n$ was $8$ times a triangular number plus one.


Note: it is easy to observe that the difference between two successive squares is greater than $8$ provided the larger is at least $25$. The difference between two successive squares grows without limit, so no arithmetic progression will work to give a sufficient condition.

The triangle number condition is quadratic (and therefore goes with squares), but is so easy that it adds very little useful information.