1

Show that if $a$ is any integer not divisible by $p$, then $a^{(p-1)/2}\equiv \pm 1 \pmod p$.

I know one wants to use Fermat's Little Theorem which states if $a$ is any integer not divisible by $p$, then $a^{p-1} \equiv 1 \pmod p$.

I was considering starting off with this and taking the square root of both sides; however, trouble can occur when $a^{(p-1)/2}$ is not a perfect square, and I'm not sure how to handle this.

Bill Dubuque
  • 282,220
Adam Staples
  • 985
  • 13
  • 24

2 Answers2

4

Use a difference of squares factorization: $$a^{p-1}-1=\left[a^{(p-1)/2}-1\right]\cdot\left[a^{(p-1)/2}+1\right]\equiv 0\pmod{p},$$ so by Euclid's Lemma $p$ divides one of the two factors. It follows that $a^{(p-1)/2}\equiv\pm 1\pmod{p}$.

Bill Dubuque
  • 282,220
tc1729
  • 3,217
0

$$\text{Put }\displaystyle a^{\frac{p-1}2}=b\implies b^2\equiv1\pmod p$$ using Fermat's Little Theorem

Now I don't want to repeat this argument