What are all possible values of $ x \equiv a^\frac{p-1}{2} \pmod p$?

246 Views Asked by At

Suppose p is an odd prime and a $\in$ $\mathbb{Z}$ such that $ a \not\equiv 0 \pmod p$. What are all the values of $ x \equiv a^\frac{p-1}{2} \pmod p$ ?

This is what I got so far:

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

By Fermat's Little Theorem,

$ x^2 \equiv 1 \pmod p$

$ x^2 - 1 \equiv 0 \pmod p$

$ (x - 1)(x+1) \equiv 0 \pmod p$

So $\;p\mid(x-1)$ or $p\mid(x+1)$.

2

There are 2 best solutions below

0
On

$x^2=1 \pmod p \Rightarrow x=\pm 1\pmod p$

0
On

Do you know about quadratic residues ?
The values of $x$ are $1$ and $-1$.
$\frac{p-1}{2}$ values of $1$ and also $\frac{p-1}{2}$ values of $-1$.