-1

Let $a \in \mathbb{Z}$ and $p > 2$ be a prime number.

What values can $a^{\frac{p-1}{2}}\bmod p$ take?

I am a bit dumbfounded by this question? By Fermat we know that $a^{p-1} \equiv 1 \bmod p$.

After testing some values it seemed to me that the equation can take values that are just the opposite, concretely: $p\mid a^{\frac{p-1}{2}} +1$.

The question itself doesn’t ask for a prove, just what values it can assume. Would the set of prime numbers minus one be the right answer? I'm a little lost.

Bill Dubuque
  • 272,048

1 Answers1

2

If $x^2 \equiv 1 \pmod{p}$, we must have $x \equiv \pm 1 \pmod{p}$. This is true because $p$ divides $(x + 1)(x - 1)$ and $p$ is prime so either $x \equiv 1 \pmod{p}$ or $x \equiv -1 \pmod{p}$. Conversely, if $x \equiv 1 \pmod{p}$ or $x\equiv -1 \pmod{p}$, then $x \cdot x$ is still $1 \pmod{p}$.

In your case, we can set $x = a^{(p - 1)/2}$ so that $x^{2} \equiv a^{p - 1} \equiv 1 \pmod{p}$ by Fermat's Theorem.

Ekesh Kumar
  • 3,500
  • Alright that makes sense. So dividing the exponent by two flips fermats Theorem around, do I see that right? It’s like adding one instead of substracting one – J3ck_Budl7y Oct 13 '22 at 01:18
  • 1
    We can get $(p-1) \vee 1 \vee 0$ (e.g., $3^{\frac{3-1}{2}}=3$ and it follows that $3 \equiv 0 \pmod 3$), see my answer. – Marco Ripà Oct 13 '22 at 01:30
  • 1
    @EkeshKumar, I got it now! Thanks, the part with squaring it to get to Fermat made it clear for me – J3ck_Budl7y Oct 13 '22 at 01:33
  • 2
    Please strive not to post more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. – Bill Dubuque Oct 13 '22 at 03:15