Show there are infinitely many primes of the form $5k+1$. This question already has answers here: Infinitely many primes $5n+1$, I am trying to follow Thomas Andrew's answer.
Why does $m^5-1\equiv 0$ imply $p\equiv 1 \pmod{5}$, because $m\neq 1 \pmod{5}$.
Best Answer
To answer "Why $m \neq 1 (\mod p)$ implies $p = 1 (\mod5)$":
$m \neq 1 (\mod p)$ but $m^5 = 1 (\mod p)$. Therefore, the subgroup $<m> \subset (\mathbb{Z} / p \mathbb{Z})^*$ has order 5. The order of $(\mathbb{Z} / p \mathbb{Z})^*$ must be a multiple of $5$ by Lagrange's theorem.
The order of the $(\mathbb{Z} / p \mathbb{Z})^*$ is $p-1$, so the $p = 1 (\mod 5)$.