# Factor of Mersenne Number equivalent to +-1 mod 8

## Theorem

Let $p$ and $q$ be prime numbers such that $q$ is a divisor of the Mersenne number $M_p$.

Then:

$q \equiv \pm 1 \pmod 8$

## Proof

Suppose $q \mathop \backslash M_p$.

$q - 1 = 2 k p$

From above:

$2^{\left({q - 1}\right) / 2} \equiv 2 k p \equiv 1 \pmod q$

and so $2$ is a quadratic residue $\pmod q$.

$q \equiv \pm 1 \pmod 8$

$\blacksquare$