# Prove for any positive odd integer $n$, $3\mid n$ or $n^2 \equiv 1 \pmod {12}$ [duplicate]

I try to use $$~n=2x+1~$$ to prove it and $$~n^2-1=4x(x+1)~$$. I do not know how to prove it.

Really need help here.

When $$n$$ is $$1$$ $$mod$$ $$2$$ then $$n^2$$ is $$1$$ $$mod$$ $$4$$. If $$n$$ is not divisible by $$3$$ then $$n^2$$ is $$1$$ $$mod$$ $$3$$

Thus when $$n$$ is not divisible by $$3$$ one has that

$$n^2 \equiv 1$$ $$mod$$ $$4$$

and

$$n^2 \equiv 1$$ $$mod$$ $$3$$

Now since $$(4,3) = 1$$ one can apply chinese remainder theorem to deduce $$n^2 \equiv 1$$ $$mod$$ $$12$$

For odd n, not divisible by 3, then n = 6k ± 1:

$$n^2 = (6k ± 1)^2 = 36k^2 ± 12k + 1 = 12k(3k ± 1) + 1$$

There can be 6 possibility of the numbers , $$6n , 6n ± 1, 6n±2,6n+3$$ => Now if the number is of the form : $$6n \ or \ 6n+3$$ it is divisible by 3 so we are done.

=> If the numbers is $$\ 6n±2$$ then it is an even numbers and so out of the boundary of the Quest.

=> Now if the number is $$6n±1$$ then its square would be $$36n ± 12n +1$$ which leaves remainder 1 when divides by 12 .

Hence Proved