Show that $q\equiv_8 1$ when $q$ is an odd square number

91 Views Asked by At

Problem: Given: q is an odd squared number - show that: $q\equiv_8 1$

My assumption: $\forall q\in N:\exists a \in Z: a =1\pmod{2}$ and $a^2=q$.

Then I tried to show that it's only true satisfyingly if $\mathrm{gcd}(q,8)\mid 1 \leftrightarrow x\cdot q+y\cdot 8=1$.

But I don't know how to show that it is true for all numbers $q$.

All hints are welcome.

2

There are 2 best solutions below

3
On BEST ANSWER

Any odd number is congruent to $1,3,5,7$ mod $8$. Each of these when squared gives remainder $1$ mod $8$.

0
On

$$\begin{align} 1^2 = 1 &\equiv 1 \pmod 8\\ 3^2=9 &\equiv 1 \pmod 8\\ 5^2=25 &\equiv 1 \pmod 8\\ 7^2=49 &\equiv 1 \pmod 8\\ (8q+k)^2 = 8q(8q+k) + 8qk +k^2 &\equiv k^2 \pmod 8\\ \end{align}$$