Show that there are infinitely many primes of the form $8n+1,8n+3,8n+5,8n+7$

arithmetic-progressionselementary-number-theorymodular arithmeticprime numbers

This is the full question

Let $P$ be an odd prime. Prove that if there is an integer $x$ such that,

$$ p\mid x^2+1 \text{ then } p \equiv 1 \pmod 4 $$

$$ p\mid x^2-2 \text{ then } p \equiv 1 \text{ or } 7\pmod 8 $$

$$ p\mid x^2+2 \text{ then } p \equiv 1 \text{ or } 3\pmod 8 $$

$$ p\mid x^4+1 \text{ then } p \equiv 1 \pmod 8 $$

Show that there are infinitely many primes of each of the forms $8n+1,8n+3,8n+5,8n+7$

I was able to show all the above four relations, but i don't understand how these imply that there are infintely many such primes.

Best Answer

Say you have $p|x^2+2$ implies $p\in\{1,3\}\bmod 8$. Now suppose there are only finitely many primes of the form $8n+3$. Let $\Pi$ be the product of these primes and consider the combination

$M=\Pi^2+2$

None of the primes used to make $\Pi$ can be a factor of $M$ and the actual prime factors of $M$ cannot be all of the form $8n+1$ because $M\equiv 3\bmod 4$. We are forced to allow more $8n+3$ prime factors, thus the proposed finite set of such primes could not have contained all of them.

Use your other expressions to render similar proofs for the other cases.