Dirichlet's Theorem on Arithmetic Progressions (Theorem # 1751)
Theorem
Let $a, N \in \mathbb{Z}$ with $N > 1$ and $\gcd(a, N) = 1$. Then the arithmetic progression $\{a, a+N, a+2N, \ldots\}$ contains infinitely many primes. Moreover, primes are equidistributed among residue classes coprime to $N$: each such class contains a proportion $\frac{1}{\varphi(N)}$ of the primes.
Number Theory
Analytic Number Theory
Discussion
No discussion available for this theorem.
Proof
[proofplan]
We prove Dirichlet's theorem by the classical $L$-function argument. The series $F_{a,N}(s) = \sum_{p \equiv a \pmod N} p^{-s}$ is expressed, via orthogonality of Dirichlet characters modulo $N$, as a $\varphi(N)^{-1}$-weighted sum over characters of the logarithms of Dirichlet $L$-functions $L(\chi, s) = \sum_{n \geq 1} \chi(n) n^{-s}$. Analysis of these $L$-functions as $s \to 1^+$ reduces the problem to two analytic facts: the principal character produces a singularity logarithmic in $s - 1$ (inherited from the pole of $\zeta$), while every non-principal character gives an $L$-function that is analytic and nonzero at $s = 1$. Combining these, $F_{a,N}(s) \sim \frac{1}{\varphi(N)} \log \frac{1}{s-1}$ as $s \to 1^+$, so the series diverges and the progression contains infinitely many primes. The same asymptotic shows equidistribution across residue classes coprime to $N$.
[/proofplan]
[step:Decompose the indicator of the progression $a \pmod N$ via Dirichlet character orthogonality]
Let $G_N := (\mathbb{Z}/N\mathbb{Z})^\times$ denote the unit group modulo $N$, with order $\varphi(N)$. A Dirichlet character modulo $N$ is a group homomorphism
\begin{align*}
\chi : G_N \to \mathbb{C}^\times,
\end{align*}
extended to $\mathbb{Z}$ by $\chi(n) = 0$ when $\gcd(n, N) > 1$. The set of Dirichlet characters modulo $N$ is denoted $\widehat{G}_N$ and has cardinality $\varphi(N)$.
The orthogonality relations for characters state (as proved in the [Orthogonality of Dirichlet Characters](/theorems/???)):
\begin{align*}
\sum_{\chi \in \widehat{G}_N} \chi(m) \overline{\chi(a)} = \begin{cases} \varphi(N) & \text{if } m \equiv a \pmod{N}, \\ 0 & \text{otherwise}, \end{cases}
\end{align*}
for $m, a \in \mathbb{Z}$ with $\gcd(a, N) = 1$. Here the sum ranges over all $\varphi(N)$ characters modulo $N$.
Consequently, for $\gcd(a, N) = 1$,
\begin{align*}
\mathbb{1}_{\{m \equiv a \pmod N\}} = \frac{1}{\varphi(N)} \sum_{\chi \in \widehat{G}_N} \chi(m) \overline{\chi(a)} \qquad \text{for all } m \text{ with } \gcd(m, N) = 1.
\end{align*}
For $m$ with $\gcd(m, N) > 1$, both sides vanish (the left because $m \equiv a \pmod N$ would force $\gcd(m, N) = \gcd(a, N) = 1$; the right because $\chi(m) = 0$ for all characters $\chi$).
[guided]
To study primes in the progression $\{m : m \equiv a \pmod{N}\}$, we need a tool that extracts the progression condition from a sum over all integers. Dirichlet characters provide exactly this tool via orthogonality.
A Dirichlet character modulo $N$ is a group homomorphism $\chi : G_N \to \mathbb{C}^\times$ where $G_N = (\mathbb{Z}/N\mathbb{Z})^\times$. Since $G_N$ is finite, every character takes values in roots of unity (of order dividing $\varphi(N)$), so $|\chi(m)| \in \{0, 1\}$ always: $|\chi(m)| = 1$ if $\gcd(m, N) = 1$, and we extend $\chi(m) = 0$ when $\gcd(m, N) > 1$.
The principal character $\chi_0$ sends every element of $G_N$ to $1$. All other characters are called non-principal.
Orthogonality: the set $\widehat{G}_N$ of characters is itself a group (under pointwise multiplication) of order $\varphi(N)$, and the pairing
\begin{align*}
(\chi, \psi) \mapsto \frac{1}{\varphi(N)} \sum_{m \in G_N} \chi(m) \overline{\psi(m)} = \delta_{\chi, \psi}
\end{align*}
makes $\widehat{G}_N$ an orthonormal basis for the space of functions $G_N \to \mathbb{C}$. Dually, fixing $m, a \in G_N$,
\begin{align*}
\frac{1}{\varphi(N)} \sum_{\chi \in \widehat{G}_N} \chi(m) \overline{\chi(a)} = \delta_{m, a} = \begin{cases} 1 & m \equiv a \pmod N, \\ 0 & m \not\equiv a \pmod N \text{ but } \gcd(m,N) = 1. \end{cases}
\end{align*}
For $m$ with $\gcd(m, N) > 1$, the left side vanishes because $\chi(m) = 0$ for every $\chi$.
This gives the identity: for $\gcd(a, N) = 1$ and any $m \in \mathbb{Z}$,
\begin{align*}
\mathbb{1}_{\{m \equiv a \pmod N\}} = \frac{1}{\varphi(N)} \sum_{\chi \in \widehat{G}_N} \overline{\chi(a)} \, \chi(m).
\end{align*}
We will plug this identity into the sum $F_{a, N}(s) = \sum_{p \equiv a \pmod N} p^{-s}$ to rewrite it in terms of character-twisted prime sums.
[/guided]
[/step]
[step:Express $F_{a,N}(s)$ in terms of $\log L(\chi, s)$ for each character $\chi$]
For $s \in \mathbb{R}_{> 1}$, define the Dirichlet $L$-function associated to $\chi \in \widehat{G}_N$:
\begin{align*}
L: \widehat{G}_N \times \{s \in \mathbb{R} : s > 1\} &\to \mathbb{C} \\
(\chi, s) &\mapsto \sum_{n=1}^\infty \frac{\chi(n)}{n^s}.
\end{align*}
By the bound $|\chi(n)| \leq 1$ and the [Convergence of the Zeta Series](/theorems/1746), the series converges absolutely for $\operatorname{Re}(s) > 1$ and is bounded by $\zeta(\sigma)$. Since $\chi$ is completely multiplicative on integers coprime to $N$ (i.e. $\chi(mn) = \chi(m)\chi(n)$ whenever $\gcd(mn, N) = 1$, with the convention $\chi(k) = 0$ for $\gcd(k, N) > 1$), the same unique-factorisation argument as in the [Euler Product and Non-Vanishing](/theorems/1747) yields an Euler product:
\begin{align*}
L(\chi, s) = \prod_{p \text{ prime}} \left( 1 - \frac{\chi(p)}{p^s} \right)^{-1} \qquad (s > 1).
\end{align*}
Factors with $p \mid N$ simply contribute $1$, because $\chi(p) = 0$.
Taking the logarithm (choosing the branch that is real when $\chi$ is the principal character and all $\chi(p) \in \mathbb{R}_{\geq 0}$; more generally, defining $\log L(\chi, s)$ as the sum $\sum_p -\log(1 - \chi(p)/p^s)$, valid by absolute convergence for $s > 1$),
\begin{align*}
\log L(\chi, s) = \sum_{p} \sum_{k \geq 1} \frac{\chi(p)^k}{k p^{ks}} = \sum_p \frac{\chi(p)}{p^s} + R(\chi, s),
\end{align*}
where $R(\chi, s) := \sum_p \sum_{k \geq 2} \frac{\chi(p)^k}{k p^{ks}}$. For $s > 1$, the remainder satisfies
\begin{align*}
|R(\chi, s)| \leq \sum_p \sum_{k \geq 2} \frac{1}{p^{ks}} \leq \sum_p \frac{1}{p^{2s} - p^s} \leq \sum_p \frac{2}{p^{2s}} \leq 2 \sum_{n \geq 1} n^{-2s} = 2 \zeta(2s),
\end{align*}
which is uniformly bounded on $s \in [1, \infty)$ by $2 \zeta(2) = \pi^2/3$. In particular, $R(\chi, s)$ remains bounded as $s \to 1^+$.
Now compute $F_{a,N}(s) := \sum_{p \equiv a \pmod N} p^{-s}$. Using Step 1's identity,
\begin{align*}
F_{a,N}(s) = \sum_{p} \mathbb{1}_{\{p \equiv a \pmod N\}} p^{-s} = \sum_p \frac{1}{\varphi(N)} \sum_{\chi} \overline{\chi(a)} \chi(p) \cdot p^{-s} = \frac{1}{\varphi(N)} \sum_{\chi} \overline{\chi(a)} \sum_p \frac{\chi(p)}{p^s}.
\end{align*}
Substituting $\sum_p \chi(p)/p^s = \log L(\chi, s) - R(\chi, s)$,
\begin{align*}
F_{a,N}(s) = \frac{1}{\varphi(N)} \sum_{\chi} \overline{\chi(a)} \left[ \log L(\chi, s) - R(\chi, s) \right] \qquad (s > 1).
\end{align*}
[guided]
We start with
\begin{align*}
F_{a, N}(s) := \sum_{p \equiv a \pmod N} \frac{1}{p^s}.
\end{align*}
To understand divergence as $s \to 1^+$, we rewrite $F_{a,N}$ using characters.
For each $\chi \in \widehat{G}_N$ and $s > 1$, define the Dirichlet $L$-function
\begin{align*}
L(\chi, s) = \sum_{n=1}^\infty \frac{\chi(n)}{n^s}.
\end{align*}
Convergence: $|\chi(n)/n^s| \leq n^{-s}$, and $\sum n^{-s}$ converges for $s > 1$ (the [Convergence of the Zeta Series](/theorems/1746)).
A character $\chi$ modulo $N$ is completely multiplicative on $\mathbb{Z}$ with the convention $\chi(n) = 0$ for $\gcd(n, N) > 1$. So the same geometric-series / unique-factorisation argument as for $\zeta$ (see the [Euler Product and Non-Vanishing](/theorems/1747)) produces an Euler product:
\begin{align*}
L(\chi, s) = \prod_p \left(1 - \frac{\chi(p)}{p^s}\right)^{-1}, \qquad s > 1.
\end{align*}
For primes $p \mid N$ the factor is $1$ (since $\chi(p) = 0$).
Taking logarithms (which is fine because all partial products are nonzero — the individual factors differ from $1$ by $|\chi(p)/p^s| \leq p^{-s} < 1$):
\begin{align*}
\log L(\chi, s) = -\sum_p \log\!\left(1 - \frac{\chi(p)}{p^s}\right) = \sum_p \sum_{k \geq 1} \frac{\chi(p)^k}{k p^{ks}}.
\end{align*}
Isolating the $k = 1$ term,
\begin{align*}
\log L(\chi, s) = \sum_p \frac{\chi(p)}{p^s} + R(\chi, s), \qquad R(\chi, s) := \sum_p \sum_{k \geq 2} \frac{\chi(p)^k}{k p^{ks}}.
\end{align*}
We bound $R$ to show it is a "tame" remainder: $|\chi(p)^k| \leq 1$, so
\begin{align*}
|R(\chi, s)| \leq \sum_p \sum_{k \geq 2} \frac{1}{k p^{ks}} \leq \sum_p \sum_{k \geq 2} p^{-ks} = \sum_p \frac{p^{-2s}}{1 - p^{-s}} \leq 2 \sum_p p^{-2s} \leq 2 \zeta(2s),
\end{align*}
valid for $s > 1/2$ (where the geometric bound $1 - p^{-s} \geq 1/2$ holds for $p \geq 2$, $s \geq 1$; minor adjustment for very small $s$ but we only need $s \geq 1$). For $s \in [1, \infty)$, $R(\chi, s)$ is bounded by $2\zeta(2) = \pi^2/3$, uniformly in $s$ and $\chi$.
Now apply the orthogonality identity from Step 1 to rewrite $F_{a,N}$. For $\gcd(a, N) = 1$ and any prime $p$,
\begin{align*}
\mathbb{1}_{\{p \equiv a \pmod N\}} = \frac{1}{\varphi(N)} \sum_{\chi} \overline{\chi(a)} \chi(p).
\end{align*}
(Note: primes $p \mid N$ contribute $0$ on both sides: the left because $p \mid N$ and $\gcd(a, N) = 1$ together force $p \not\equiv a \pmod N$; the right because $\chi(p) = 0$.) Substituting,
\begin{align*}
F_{a, N}(s) = \sum_p \mathbb{1}_{\{p \equiv a \pmod N\}} p^{-s} = \frac{1}{\varphi(N)} \sum_\chi \overline{\chi(a)} \sum_p \frac{\chi(p)}{p^s}.
\end{align*}
Replacing $\sum_p \chi(p)/p^s$ by $\log L(\chi, s) - R(\chi, s)$:
\begin{align*}
F_{a,N}(s) = \frac{1}{\varphi(N)} \sum_\chi \overline{\chi(a)} \log L(\chi, s) - \frac{1}{\varphi(N)} \sum_\chi \overline{\chi(a)} R(\chi, s).
\end{align*}
The second term is bounded as $s \to 1^+$ (by the bound on $R$ and the fact that there are finitely many characters). All the action is in the first term. Understanding the behaviour of $F_{a,N}(s)$ as $s \to 1^+$ reduces to understanding the behaviour of $\log L(\chi, s)$ as $s \to 1^+$ for each $\chi$.
[/guided]
[/step]
[step:Isolate the contribution of the principal character as $\log \frac{1}{s-1}$]
Let $\chi_0$ be the principal character modulo $N$, defined by $\chi_0(n) = 1$ if $\gcd(n, N) = 1$ and $\chi_0(n) = 0$ otherwise. Its $L$-function factorises as
\begin{align*}
L(\chi_0, s) = \prod_{p \nmid N} \left( 1 - \frac{1}{p^s} \right)^{-1} = \zeta(s) \prod_{p \mid N} \left( 1 - \frac{1}{p^s} \right),
\end{align*}
where the second equality removes the $p \mid N$ factors from the Euler product of $\zeta$. The finite product $\prod_{p \mid N}(1 - p^{-s})$ is bounded and has a finite nonzero limit at $s = 1$, namely $\prod_{p \mid N}(1 - 1/p) = \varphi(N)/N > 0$.
As $s \to 1^+$, by the [Analytic Continuation to $\operatorname{Re}(s) > 0$](/theorems/1748), $\zeta(s) = \frac{1}{s - 1} + O(1)$, so
\begin{align*}
L(\chi_0, s) = \frac{1}{s-1} \cdot \prod_{p \mid N}\left(1 - \frac{1}{p}\right) + O(1) \qquad \text{as } s \to 1^+.
\end{align*}
Taking logarithms,
\begin{align*}
\log L(\chi_0, s) = \log\!\frac{1}{s-1} + O(1) \qquad \text{as } s \to 1^+,
\end{align*}
where the $O(1)$ term absorbs the bounded quantity $\log[\varphi(N)/N + o(1)]$ and remains bounded as $s \to 1^+$.
[guided]
We now examine $\log L(\chi, s)$ as $s \to 1^+$, for each of the $\varphi(N)$ characters $\chi$ modulo $N$. The behaviour splits by whether $\chi$ is the principal character $\chi_0$ (which takes the value $1$ on all $n$ coprime to $N$ and $0$ otherwise) or non-principal.
For the principal character: writing the Euler product of $L(\chi_0, s)$ and using $\chi_0(p) = 1$ for $p \nmid N$, $\chi_0(p) = 0$ for $p \mid N$:
\begin{align*}
L(\chi_0, s) = \prod_{p \nmid N}\left(1 - \frac{1}{p^s}\right)^{-1} = \prod_p \left(1 - \frac{1}{p^s}\right)^{-1} \cdot \prod_{p \mid N}\left(1 - \frac{1}{p^s}\right) = \zeta(s) \cdot \prod_{p \mid N}\left(1 - \frac{1}{p^s}\right).
\end{align*}
This expresses $L(\chi_0, s)$ as $\zeta(s)$ times a finite, tame correction: $\prod_{p \mid N}(1 - p^{-s})$ is a product over primes $p \mid N$, of which there are finitely many, so it is a bounded function of $s$, and it tends to $\prod_{p \mid N}(1 - 1/p) = \varphi(N)/N$ as $s \to 1^+$ (this identity is the standard formula for $\varphi(N)$; it follows from multiplicativity of $\varphi$ applied to the prime factorisation of $N$, recorded as the [Euler Totient Function Formula](/theorems/???)).
The behaviour of $\zeta$ as $s \to 1^+$ is given by the [Analytic Continuation to $\operatorname{Re}(s) > 0$](/theorems/1748): $\zeta$ has a simple pole at $s = 1$ with residue $1$, so
\begin{align*}
\zeta(s) = \frac{1}{s-1} + H(s)
\end{align*}
for some function $H$ holomorphic in a neighbourhood of $s = 1$; in particular $H$ is bounded near $s = 1$. Therefore
\begin{align*}
L(\chi_0, s) = \left(\frac{1}{s-1} + H(s)\right) \cdot \prod_{p \mid N}\left(1 - \frac{1}{p^s}\right) = \frac{A(s)}{s-1} + B(s),
\end{align*}
with $A(s) := \prod_{p \mid N}(1 - p^{-s}) \to \varphi(N)/N > 0$ as $s \to 1^+$, and $B(s)$ bounded near $s = 1$.
Taking logarithms, as $s \to 1^+$,
\begin{align*}
\log L(\chi_0, s) = \log\!\frac{A(s)}{s - 1} + o(1) = \log\!\frac{1}{s-1} + \log A(s) + o(1) = \log\!\frac{1}{s-1} + O(1).
\end{align*}
Concretely, $\log A(s) \to \log(\varphi(N)/N)$, a finite number. So $\log L(\chi_0, s)$ grows like $\log\frac{1}{s-1}$ as $s \to 1^+$; this is where the progression "sees" the primes.
[/guided]
[/step]
[step:Show $L(\chi, 1) \neq 0$ for every non-principal character $\chi$]
The crucial analytic step is: for every non-principal character $\chi \in \widehat{G}_N \setminus \{\chi_0\}$,
\begin{align*}
L(\chi, 1) \neq 0.
\end{align*}
Non-principal character $L$-functions are absolutely convergent at $s = 1$: by the [Dirichlet Test for Series](/theorems/???), the series $\sum_{n \geq 1} \chi(n) n^{-s}$ converges for $s > 0$, because the partial sums of $\chi(n)$ are bounded. Indeed, the bounded-partial-sum property follows from orthogonality: for non-principal $\chi$,
\begin{align*}
\sum_{n=1}^M \chi(n) = \sum_{\substack{n=1 \\ n \bmod N}}^{M} \chi(n \bmod N) \leq \varphi(N),
\end{align*}
since $\sum_{m \in G_N} \chi(m) = 0$ for non-principal $\chi$ makes full periods contribute $0$, leaving only a partial period of at most $\varphi(N)$ terms. Hence $L(\chi, s)$ extends continuously to $s > 0$, and $L(\chi, 1)$ is well-defined.
To establish $L(\chi, 1) \neq 0$, we argue by product analysis. Consider the product
\begin{align*}
Z_N(s) := \prod_{\chi \in \widehat{G}_N} L(\chi, s) \qquad (s > 1).
\end{align*}
This product is a Dirichlet series with non-negative coefficients (a classical computation: $Z_N(s) = \sum_{n \geq 1} a_n n^{-s}$ with $a_n \geq 0$ and $a_1 = 1$). The precise statement is the [Non-Vanishing of Dirichlet $L$-Functions at $s = 1$](/theorems/???), which we invoke.
The key analytic input: the principal factor $L(\chi_0, s)$ has a simple pole at $s = 1$ of residue $\varphi(N)/N > 0$ (Step 3). If any non-principal $L(\chi, 1)$ were zero, it would introduce a simple zero at $s = 1$, potentially cancelling the pole of $L(\chi_0, s)$, giving the product $Z_N$ a removable singularity — in particular $Z_N$ would be bounded near $s = 1$. Combined with the fact that $Z_N$ is a Dirichlet series with non-negative coefficients and $Z_N(s) \geq 1$ for $s > 1$, the resulting contradiction with the divergence forced by the pole of $L(\chi_0, s)$ establishes that no non-principal $L(\chi, 1)$ can vanish.
We record the conclusion: for every non-principal $\chi$, $L(\chi, 1) \neq 0$, so $\log L(\chi, s) = \log L(\chi, 1) + o(1) = O(1)$ as $s \to 1^+$.
[guided]
This is the heart of Dirichlet's proof: showing that $L(\chi, 1) \neq 0$ for every non-principal character $\chi \pmod N$. We sketch the main idea — a full proof is given in the [Non-Vanishing of Dirichlet $L$-Functions at $s = 1$](/theorems/???).
First, we need to know that $L(\chi, 1)$ even makes sense. For non-principal $\chi$, the partial sums $S_M := \sum_{n \leq M} \chi(n)$ are bounded. Why? Because $\chi$ is periodic modulo $N$ and $\sum_{n \bmod N} \chi(n) = 0$ for non-principal $\chi$ (orthogonality), so full periods cancel to zero. The leftover partial period contributes at most $\sum_{n \leq N} |\chi(n)| \leq \varphi(N)$ terms, each of modulus at most $1$, so $|S_M| \leq \varphi(N)$ for all $M$.
By the [Dirichlet Test for Series](/theorems/???) (Abel summation plus boundedness of $S_M$ and monotonicity of $n^{-s} \to 0$), the series $\sum_n \chi(n) n^{-s}$ converges for every real $s > 0$. Taking the limit $s \to 1^+$, $L(\chi, 1)$ is well-defined as a convergent (conditionally) series.
Now for the non-vanishing. The standard argument: consider the product over all $\varphi(N)$ characters,
\begin{align*}
Z_N(s) := \prod_{\chi} L(\chi, s).
\end{align*}
A character identity plus positivity arguments show that $Z_N$ has non-negative coefficients as a Dirichlet series: $Z_N(s) = \sum_n a_n n^{-s}$ with $a_n \geq 0$ and $a_1 = 1$. In particular, $Z_N(s) \geq 1$ for all real $s > 1$, so $Z_N(s)$ does not approach $0$.
The non-vanishing argument: $L(\chi_0, s)$ has a simple pole at $s = 1$ with residue $\varphi(N)/N > 0$ (Step 3). Suppose, for contradiction, that for some non-principal $\chi$ we had $L(\chi, 1) = 0$. Then $L(\chi, s)$ would have a zero at $s = 1$ of order at least $1$. Since the conjugate character $\overline{\chi}$ satisfies $L(\overline{\chi}, s) = \overline{L(\chi, \bar{s})}$, it too would have a zero at $s = 1$ if $\chi$ is complex non-real. Counting: if $\chi$ is real (i.e. $\chi^2 = \chi_0$, $\chi \neq \chi_0$), then $L(\chi, s)$ has at most a single zero at $s = 1$; if $\chi$ is complex, $\chi \neq \overline\chi$ and both $L(\chi, 1), L(\overline\chi, 1) = 0$ gives two zeros. In both cases, the zeros of non-principal $L$-functions at $s = 1$ outnumber the single pole of $L(\chi_0, s)$, so $Z_N(s)$ tends to $0$ as $s \to 1^+$ — contradicting $Z_N(s) \geq 1$.
There is one subtle case left: a real non-principal character $\chi$ with $L(\chi, 1) = 0$. In this case only one factor vanishes, which exactly cancels the pole of $L(\chi_0)$, making $Z_N$ analytic and bounded at $s = 1$. Excluding this case requires a separate argument (the classical approach is via quadratic forms or via the explicit formula $L(\chi_{-N}, 1) = \pi h(-N)/\sqrt{N}$ for real odd $\chi$, which is strictly positive). We take this as an input: the [Non-Vanishing of Dirichlet $L$-Functions at $s = 1$](/theorems/???) establishes $L(\chi, 1) \neq 0$ for all non-principal characters.
Given this, $\log L(\chi, s) = \log L(\chi, 1) + o(1)$ as $s \to 1^+$ is a finite constant plus an error — in particular $\log L(\chi, s) = O(1)$.
[/guided]
[/step]
[step:Combine to show $F_{a,N}(s) \to \infty$ and extract equidistribution]
From Steps 2, 3, 4,
\begin{align*}
F_{a,N}(s) = \frac{1}{\varphi(N)} \sum_{\chi} \overline{\chi(a)} \log L(\chi, s) + O(1) \qquad \text{as } s \to 1^+.
\end{align*}
Separating the principal character,
\begin{align*}
F_{a,N}(s) = \frac{\overline{\chi_0(a)}}{\varphi(N)} \log L(\chi_0, s) + \frac{1}{\varphi(N)} \sum_{\chi \neq \chi_0} \overline{\chi(a)} \log L(\chi, s) + O(1).
\end{align*}
Since $\gcd(a, N) = 1$, $\chi_0(a) = 1$, so $\overline{\chi_0(a)} = 1$. By Step 3, $\log L(\chi_0, s) = \log\frac{1}{s-1} + O(1)$. By Step 4, $\log L(\chi, s) = O(1)$ for each non-principal $\chi$, and there are finitely many such characters, so the non-principal sum is $O(1)$ as $s \to 1^+$. Hence
\begin{align*}
F_{a,N}(s) = \frac{1}{\varphi(N)} \log\!\frac{1}{s-1} + O(1) \qquad \text{as } s \to 1^+.
\end{align*}
Taking $s \to 1^+$, the right-hand side tends to $+\infty$. Therefore $F_{a,N}(s) \to +\infty$, which forces the series $\sum_{p \equiv a \pmod N} p^{-s}$ to diverge as $s \to 1^+$. A finite sum of positive terms cannot diverge, so
\begin{align*}
\#\{p \text{ prime} : p \equiv a \pmod N\} = \infty.
\end{align*}
For the equidistribution statement: the asymptotic
\begin{align*}
F_{a, N}(s) \sim \frac{1}{\varphi(N)} \log\!\frac{1}{s-1} \qquad (s \to 1^+)
\end{align*}
is independent of $a$ (as long as $\gcd(a, N) = 1$). Comparing to the unrestricted sum
\begin{align*}
\sum_{\substack{p \text{ prime} \\ p \nmid N}} p^{-s} = \sum_{\gcd(a, N) = 1} F_{a, N}(s) \sim \log\!\frac{1}{s-1} \qquad (s \to 1^+),
\end{align*}
which follows from $\sum_{p} p^{-s} = \log \zeta(s) + O(1) = \log \frac{1}{s-1} + O(1)$ (a corollary of the [Logarithmic Derivative of Zeta](/theorems/1750) and Step 3, after subtracting the bounded prime-power remainder), the ratio
\begin{align*}
\frac{F_{a, N}(s)}{\sum_{p \nmid N} p^{-s}} \xrightarrow[s \to 1^+]{} \frac{1}{\varphi(N)}.
\end{align*}
Each residue class coprime to $N$ contains the same proportion $1/\varphi(N)$ of primes in this Dirichlet-density sense. This completes the proof.
[guided]
We combine the results to analyse $F_{a, N}(s)$ as $s \to 1^+$.
From Step 2,
\begin{align*}
F_{a, N}(s) = \frac{1}{\varphi(N)} \sum_\chi \overline{\chi(a)} \log L(\chi, s) + E(s),
\end{align*}
where $E(s) = -\frac{1}{\varphi(N)} \sum_\chi \overline{\chi(a)} R(\chi, s) = O(1)$ as $s \to 1^+$ (since $|R(\chi, s)|$ is uniformly bounded and there are $\varphi(N)$ characters).
Split the sum over $\chi$ into principal and non-principal parts. For the principal character, $\chi_0(a) = 1$ (using $\gcd(a, N) = 1$), so
\begin{align*}
\frac{\overline{\chi_0(a)}}{\varphi(N)} \log L(\chi_0, s) = \frac{1}{\varphi(N)} \log L(\chi_0, s).
\end{align*}
By Step 3, $\log L(\chi_0, s) = \log\frac{1}{s-1} + O(1)$ as $s \to 1^+$.
For each non-principal character $\chi$, by Step 4, $L(\chi, 1) \neq 0$, so $\log L(\chi, s) = \log L(\chi, 1) + o(1)$ as $s \to 1^+$, which is $O(1)$. There are $\varphi(N) - 1$ non-principal characters, so their contribution to $F_{a, N}(s)$ is
\begin{align*}
\frac{1}{\varphi(N)} \sum_{\chi \neq \chi_0} \overline{\chi(a)} \log L(\chi, s) = O(1).
\end{align*}
Assembling,
\begin{align*}
F_{a, N}(s) = \frac{1}{\varphi(N)} \log\!\frac{1}{s-1} + O(1) \qquad (s \to 1^+).
\end{align*}
As $s \to 1^+$, the right-hand side $\to +\infty$, so $F_{a, N}(s) \to +\infty$. But if only finitely many primes $p_1, \ldots, p_r$ satisfied $p_j \equiv a \pmod N$, then $F_{a, N}(s) \leq \sum_{j=1}^r p_j^{-1}$ would be bounded for all $s \geq 1$, contradicting divergence. Therefore the progression $\{p \equiv a \pmod N\}$ contains infinitely many primes.
For the equidistribution statement, note that the asymptotic coefficient $\frac{1}{\varphi(N)}$ is independent of the residue class $a$ (as long as $\gcd(a, N) = 1$). The same asymptotic holds for every valid class. Summing over all $\varphi(N)$ residue classes coprime to $N$,
\begin{align*}
\sum_{\substack{a \pmod N \\ \gcd(a, N) = 1}} F_{a, N}(s) = \sum_{p \nmid N} p^{-s} \sim \log\!\frac{1}{s-1} \quad (s \to 1^+).
\end{align*}
(The unrestricted prime-reciprocal sum satisfies this asymptotic too; this follows from $-\log \zeta(s) = \sum_p \log(1 - p^{-s}) = -\sum_p p^{-s} + O(1)$ and the pole of $\zeta$.) Therefore the relative frequency of primes in each class tends to
\begin{align*}
\frac{F_{a, N}(s)}{\sum_{p \nmid N} p^{-s}} \to \frac{1/\varphi(N)}{1} = \frac{1}{\varphi(N)} \qquad (s \to 1^+).
\end{align*}
This is the Dirichlet density of primes in the progression $a \pmod N$, equal to $1/\varphi(N)$ for every $a$ coprime to $N$: primes are equidistributed among the $\varphi(N)$ residue classes coprime to $N$.
[/guided]
[/step]
Explore Further
Irreducibility Forces a Single Segment
Local Fields
Rational Parametrization of the Unit Circle
Diophantine Equations
Explicit Formula for $\varphi$
Elementary Number Theory
Uniqueness of Reduced Form
Elementary Number Theory
Faltings Isogeny Theorem
Number Theory
Möbius Inversion Formula
Elementary Number Theory
Compatibility of Hecke Operators with Holomorphic Differentials and the Abel-Jacobi Period Lattice
Number Theory
Explicit Local Artin Map
Local Fields
Number Theory
Area