2

If $p$ is an odd prime and $p \nmid a$, show that $a^{(p-1)/2} \equiv \pm 1 \pmod{p}$.

So I can completely see Fermat's Little Theorem in this problem, in class we went over the theorem as well as an alternate version which states $a^p \equiv a \pmod{p}$. Looking this over I am still not quite sure how the formula above would yield a a $\pm 1$. Any help is appreciated.

1 Answers1

1

We will need the fact that if $x^2\equiv 1\pmod{p}$, then $x\equiv 1\pmod{p}$ or $x\equiv -1\pmod{p}$.

This fact is not difficult to prove. For if $x^2\equiv 1\pmod{p}$, then $p$ divides $x^2-1$, so $p$ divides $(x-1)(x+1)$.

But if a prime divides a product, then the prime divides (at least) one of the terms. So $p$ divides $x-1$ or $p$ divides $x+1$. That shows that $x\equiv 1\pmod{p}$ or $x\equiv -1\pmod{p}$.

Now let $x=a^{(p-1)/2}$, and use Fermat's Little Theorem.

André Nicolas
  • 514,336