Understanding why $(\frac{a}{p}) \equiv a^{(p-1)/2} \pmod p$ when $p \mid a$

85 Views Asked by At

Let p be any prime, then

$\left(\frac{a}{p}\right) \equiv a^{(p-1)/2}$ (mod $p$)

For the case $p|a$, the textbook just says it is obviously.

If $p|a$, is $a^{(p-1)/2}\equiv0$ (mod $p$), am I correct?

From the definition, we know

Given $p$ is an odd prime, the Legendre symbol $\left(\frac{a}{p}\right)=0$ if $p|a$

But Why $\left(\frac{a}{p}\right) = 0$? In such case(i.e $(a, p) \neq 1)$, is $a$ neither a quadratic residue nor a quadratic nonresidue modulo m?

1

There are 1 best solutions below

3
On

You are correct saying that if $p$ divide $a$, then $a^{(p-1)/2}\equiv 0\bmod p$. In fact, $a\equiv 0\bmod p$, which is stronger.

Regarding your other question, $a$ is either a quadratic residue $\bmod p$ or a quadratic nonresidue $\bmod p$. This is exactly the same saying that your jacket is either blue or not blue. The point is that $\displaystyle\left(\frac{a}{p}\right)=1$ if and only if $a$ is a nonzero quadratic residue $\bmod p$.

As I am not sure what you are exactly asking, let me know if I misunderstood something.