# Conclude there are infinitely primes with given residue class

1. There are infinitely many primes $p$, such that $p \equiv 1 \pmod{3}$
2. There are infinitely many primes $p$, such that $p \equiv -1 \pmod{3}$
3. There are infinitely many primes $p$, such that $p \equiv 1 \pmod{4}$
4. There are infinitely many primes $p$, such that $p \equiv -1 \pmod{4}$
5. There are infinitely many primes $p$, such that $p \equiv \pm 2 \pmod{5}$

Is it possible to use this knowledge (maybe together with the Chinese Remainer Theorem) to conclude, that there are infinitely many primes $p$, such that $p \equiv -1 \pmod{5}$?

• Do you know about Dirichlet's theorem? – Mastrem Feb 8 '18 at 19:08
• @Mastrem I know about the theorem, but I do not want to apply it to this problem. – user7802048 Feb 9 '18 at 14:14
• At some point, the returns on proving these things one by one diminishes. What is that point? $p \equiv -47 \pmod{93}$? $p \equiv 1 \pmod{997}$? – Robert Soupe Feb 9 '18 at 23:03
• @RobertSoupe I'm well aware of this. There are much more powerful theoretical concepts (namely Dirichlet's theorem). Currently I'm studying for an elementary number theory exam and wanted to give some proofs only using more or less elementary reasoning. – user7802048 Feb 10 '18 at 16:15

Given any finite set of primes $p_1,p_2,\ldots, p_k$, each of the form $5k-1$, we can form the value
$$N = 5(2p_1p_2\cdots p_k)^2 - 1.$$
It is clear that $N$ is divisible only by odd primes, none of which are equal to $5$ or any of the $p_i$. Furthermore, any prime $q$ which divides $N$ must have $5$ as a quadratic residue (since $(2p_1p_2\cdots p_k)^{-1}$ is a square root of $5$ modulo $q$), and by quadratic reciprocity this means $q \equiv \pm1 \pmod 5$.
Finally, not all of the primes dividing $N$ can be $1 \pmod 5$ since $N$ is itself positive and $-1 \pmod 5$. So there must be at least one $q \mid N$ which is $-1 \pmod 5$, and it is necessarily distinct from $p_1,\ldots, p_k$.