0

Fermat's Little Theorem states that, if $p$ does not divide $a$, then:

$$a^{p - 1} \equiv 1 \pmod{p}$$

From this, can we derive the following:

$$a^{\frac{p - 1}{2}} \equiv \, ?\pmod{p}$$

If not, is there an answer to what $?$ should be in the above congruence?

Arturo Magidin
  • 417,286
Jacob G.
  • 163

2 Answers2

2

Since $(a^{\frac{p-1}2})^2\equiv a^{p-1}\equiv 1\pmod p,$ $(a^{\frac{p-1}2})^2-1\equiv (a^{\frac{p-1}2}-1)(a^{\frac{p-1}2}+1)\equiv 0\pmod p,$ so $a^{\frac{p-1}2}\equiv \pm 1\pmod p.$

Kenta S
  • 18,181
2

Fermat is equivalent to $a^{\frac{p-1}{2}}\equiv \pm 1 \pmod p$. This is because the congruence $x^2 \equiv 1 \pmod p$ has exactly two solutions $\pm 1$.

orangeskid
  • 56,630