TITLE: Suppose that $p$ is a prime with $p \equiv 7 \pmod 8$. If $t = \frac{p - 1}{2}$ , prove that $2^t \equiv 1 \pmod p$
QUESTION [5 upvotes]: Suppose that $p$ is a prime with $p \equiv 7 \pmod 8$. If $t = \frac{p - 1}{2}$ , prove that $$2^t \equiv 1 \pmod p.$$
Any hints will be appreciated. Thanks so much.

REPLY [2 votes]: Obviously $p$ is odd.
It is well known that $$\left(\dfrac 2p\right)=(-1)^{\frac{p^2-1}{8}}$$ where $\left(\dfrac ap\right)$ is the Legendre's symbol.
On the other hand $$p=8m+7\Rightarrow p^2-1=64m^2+112m+48\Rightarrow\frac{p^2-1}{8}=8m^2+14m+6\in 2\Bbb Z$$
It follows (because $\frac{p^2-1}{8}$ is even) $$\left(\dfrac 2p\right)= 1$$ which means that $2$ is a square modulo $p$.
Thus $$\left(2\right)^{\frac{p-1}{2}}=\left(x^2\right)^{\frac{p-1}{2}}=x^{p-1}\equiv 1\pmod p$$