# For a prime of the form $p=2k+1$, show that if $p\!\!\not|a$ and $a\equiv b^{2}\!\!\mod p$, then $a^k\equiv1\!\!\mod p$.

I'm having some trouble with the following question from chapter 1.4 of Beachy and Blair's Abstract Algebra.

Let $a,b$ be integers, and let $p$ be a prime number of the form $p=2k+1$. Show that if $p\!\!\not|a$ and $a\equiv b^{2}\!\!\mod p$, then $a^k\equiv1\!\!\mod p$.

My attempt: Since $p\!\!\not|a$ and $p$ is prime, $(a,n)=1$. Then by Euler's Theorem and using the fact that $\phi(p)=p-1$ for prime $p$ \begin{align} a^{\phi(p)} & \equiv1\!\!\mod p\\ a^{p-1} & \equiv1\!\!\mod p\\ a^{(2k+1)-1} & \equiv1\!\!\mod p\\ a^{2k} & \equiv1\!\!\mod p\\ (a^{k})^{2} & \equiv1\!\!\mod p.\\ \end{align}

I'm unsure how to use the second condition $a\equiv b^{2}\!\!\mod p$ to proceed.

• Subtracting $1$ from both sides of the congruence and then factorising, it follows that $a^k\equiv \pm 1\pmod p$. This should give you a head start. – Mr Pie May 30 '18 at 5:05

"I'm unsure how to use the second condition $a≡b^2\mod p$ to proceed."

Just do it.

$a \equiv b^2 \mod p$ so

$a^{k} \equiv b^{2k} \mod p$.

Either $p\mid b$ and $a^k \equiv b^{2k}\equiv 0 \mod p$.

Or $p\not \mid b$ and $b^{2k} = b^{p-1}\equiv 1 \mod p$.

But if $a^k\equiv 0 \mod p$ then $p|a^k$ and $p|a$ which... we were told was not the case.