Dirichlet's theorem for modulus eight

From Number

Statement

For any odd natural number a, there are infinitely many primes p such that:

pa(mod8).

Facts used

  1. Congruence condition for two to be a quadratic residue
  2. Congruence condition for minus one to be a quadratic residue
  3. Nonconstant polynomial with integer coefficients and nonzero constant term takes infinitely many pairwise relatively prime values

Proof

We need to consider four congruence classes modulo 8: 1,3,5,7. We do these case by case.

Congruence class of 1 modulo 8

By fact (2), 2 is a quadratic residue modulo p if and only if p±1(mod8). In particular, a prime p can divide n22 for some natural number n if and only if p±1(mod8).

Consider now the polynomial f(x)=(2x+1)22=4x2+4x1. For any natural number n, all prime divisors of f(n) are congruent to ±1(mod8). However, f(n) itself is 1 modulo 8, so f(n) must have at least one prime divisor that is 1 modulo 8. By fact (3), there are infinitely many pairwise relatively prime values of f(n), yielding infinitely many distinct primes that are 1 modulo 8.

Congruence class of 3 modulo 8

By facts (1) and (2), we can deduce that 2 is a quadratic residue modulo p if and only if p1,3(mod8). In particular, a prime p can divide n2+2 for some natural number n if and only if p±1(mod8).

Consider now the polynomial f(x)=(2x+1)2+2=4x2+4x+1. For any natural number n, all prime divisors of f(n) are congruent to 1,3(mod8). However, f(n) itself is 3 modulo 8, so f(n) must have at least one prime divisor that is 3 modulo 8. By fact (3), there are infinitely many pairwise relatively prime values of f(n), yielding infinitely many distinct primes that are 3 modulo 8.