-1

I have a question:

$p$ is an odd prime number. Prove that for any $a$ which is coprime to $p$ : $a^{(p-1)/2} \equiv 1 \pmod p$ or $a^{(p-1)/2}\equiv-1 \pmod p$.

My approach: $p$ is odd so I write it as: $p = 2k + 1 $ .

By Fermat's little theorem we get: $a^{2k} = 1$ mod (2k+1) So: $a^{k} a^{k} = 1$ mod (2k+1)

All I need to show right now is that $a^{k} = 1$ (mod 2k+1) or $a^{k} = -1$ (mod 2k+1) but I'm stuck with ideas. any help please

user26857
  • 53,190
CnR
  • 2,061

1 Answers1

3

Use the following two facts

  1. $(a^{(p-1)/2})^{2} = a^{p-1} \equiv 1 \pmod{p}$. (You have already done that.)
  2. In a field, a polynomial of degree $n$ has at most $n$ distinct roots. In this case, you want to take the polynomial $x^{2} - 1$ over the field with $p$ elements.