Is saying $n \not\equiv \pm a$ mod $p$ equivalent to saying $n^2 \not \equiv a^2$ mod $p$?

75 Views Asked by At

Is saying $n \not\equiv \pm a$ mod $p$ equivalent to saying $n^2 \not \equiv a^2$ mod $p$?

I'm not really familiar with quadratic congruences. I'm pretty sure the RHS has more solutions modulo $p$, can anyone explain why? (assume $n$ is unknown, $a$ and $p$ are given, and $p$ is prime).

2

There are 2 best solutions below

0
On BEST ANSWER

Well, since we can see everything happening in the field $\;\Bbb F_p\;$ , we have that $$n^2=a^2\pmod p\iff (n-a)(n+a)=0\pmod p\iff n=\pm a\pmod p$$

0
On

Note that $n^2\equiv a^2\pmod p$ is equivalent to $n^2-a^2\equiv 0\pmod p$, i.e., $p\mid n^2-a^2=(n+a)(n-a)$. Since $p$ is prime, the latter is equivalent to $p\mid n+a\lor p\mid n-a$, i.e., $n\equiv \pm a\pmod p$.