5
$\begingroup$

A would be very thankful if somebody would help me understand and resolve following problem:

"Let $p$ be an odd prime number, let $a$ be any integer, let $b = a^{(p-1)/2}$. Show that $b$ mod $p$ is either $0$ or $1$ or $(p-1)$."

Thanks

2 Answers 2

2

Little Fermat's theorem tells that $a^p\equiv a\pmod p$. Since $p-1$ is even, we can write $$a(a^{(p-1)/2}+1)(a^{(p-1)/2}-1)\equiv 0\pmod p$$ Now, since $\Bbb Z_p$ is an integral domain (in fact it is a field), one of the factors is $0$.

1

If $p$ divides $a$, then $a^{(p-1)/2}\equiv 0 \mod p$, and then $b\equiv 0 \mod p$. If p does not divide $a$, then $a^{p-1} \equiv 1 \mod p$ (Fermat's little thm). Therefore, since $b=a^{(p-1)/2}$, we have $b^2\equiv 1 \mod p$, and then $b\equiv \pm 1 \mod p$.