0

So I have this very simple modular arithmetic question:

How do I prove that squares of a non multiple of 3 is always congruent to 1 mod 3? In math terms, how do I prove

for $n \not\equiv 0 \pmod{3}$,

$n^2 \equiv 1 \pmod{3}$

Might seem a little simple, just wanted a proof,

Thank you Stack Exchange community.

Bill Dubuque
  • 282,220
  • 4
    Welcome to Mathematics Stack Exchange. Note that, if $n\not\equiv0\pmod3$, then $n\equiv1\pmod3$ or $n\equiv2\pmod3$ – J. W. Tanner Jan 11 '24 at 02:12
  • 1
    One way would be to take cases for n modulo 3. You can also note that out of $(n-1), n, (n+1)$, exactly one is divisible by 3. This cannot be n. So we get $3|(n-1)(n+1)=n^2-1$. The result follows directly. – Shreya Mundhada Jan 11 '24 at 03:31
  • I see from another question you asked that you have heard of Fermat's Little Theorem. You could apply that for $p=3$ – J. W. Tanner Jan 11 '24 at 04:33
  • Hint: $,n\not\equiv 0\Rightarrow n\equiv\pm1\Rightarrow n^2\equiv 1.,$ See the linked dupe for other ways. – Bill Dubuque Jan 11 '24 at 15:57

0 Answers0