= Solution
Fix a modulus $q$ and a <residue class> $a$ with $(a,q)=1$. The <Dirichlet characters> modulo $q$ are the one-dimensional <characters of a representation> of $(\mathbb Z/q\mathbb Z)^\times$, extended by zero on nonunits. Let $\chi_0$ be the <principal Dirichlet character>.
For every <nonprincipal Dirichlet character> the <partial sums> $\sum_{n\le u}\chi(n)$ are bounded: the sum over a full period is zero, and a remaining incomplete period has bounded length. <Partial summation> therefore continues its <Dirichlet L-function> holomorphically to $\Re s>0$ by
$$
L(s,\chi)=s\int_1^\infty\left(\sum_{n\le u}\chi(n)\right)u^{-s-1}\,du.
$$
This shows in particular that it has no <pole> at one. By contrast
$$
L(s,\chi_0)=\zeta(s)\prod_{p\mid q}(1-p^{-s})
$$
has a simple <pole> there. We use the stipulated nonvanishing $L(1,\chi)\ne0$ for every real <nonprincipal Dirichlet character>, and establish the remaining nonvanishing as follows.
For real $\sigma>1$, take the <product over all Dirichlet characters>. The <Euler product> <logarithms> and <Orthogonality of Dirichlet characters> give
$$
\log\prod_{\chi\bmod q}L(\sigma,\chi)
=\sum_{p\nmid q}\sum_{j\ge1}\frac{\sum_\chi\chi(p)^j}{jp^{j\sigma}}
=\varphi(q)\sum_{p\nmid q}\sum_{\substack{j\ge1\\p^j\equiv1\pmod q}}\frac1{jp^{j\sigma}}\ge0.
$$
Thus this product is real and at least one. If a nonreal <Dirichlet character> had $L(1,\chi)=0$, <complex conjugation> would also give $L(1,\overline\chi)=0$. These are distinct factors. Two zeros and only one possible simple <pole> force the whole product to tend to zero as $\sigma\downarrow1$, contradicting the lower bound. Hence \b[all <nonprincipal Dirichlet characters> have $L(1,\chi)\ne0$], under the given real-character assumption.
For $\sigma>1$, <absolute convergence> of each <Euler product> gives
$$
\log L(\sigma,\chi)
=\sum_{p\nmid q}\frac{\chi(p)}{p^\sigma}+O(1),
$$
with bounded remainder as $\sigma\downarrow1$: the terms of prime-power exponent at least two have total modulus at most $\sum_{n\ge2}1/(n(n-1))$. Since a nonprincipal $L$ defines a <holomorphic function> that is nonzero near one, its Euler-product <logarithm> differs from a local <holomorphic logarithm> by a fixed <integer> multiple of $2\pi i$ on a short real interval. It is therefore bounded there. For the <principal Dirichlet character> the <pole> instead gives
$$
\log L(\sigma,\chi_0)=\log\frac1{\sigma-1}+O_q(1).
$$
Apply the <Dirichlet character> orthogonality relation at each <prime>. The <prime-character sum near one> yields
$$
\sum_{p\equiv a\pmod q}p^{-\sigma}
=\frac1{\varphi(q)}\sum_{\chi\bmod q}\overline{\chi(a)}\log L(\sigma,\chi)+O_q(1)
=\frac1{\varphi(q)}\log\frac1{\sigma-1}+O_q(1).
$$
This tends to infinity. A finite set of <primes> would have a bounded sum as $\sigma\downarrow1$, so \b[every <coprime> <residue class> contains infinitely many <primes>]. This proves the <Dirichlet theorem on primes in arithmetic progressions> from the specified assumption. In fact it proves divergence of the corresponding reciprocal-prime series and gives <Dirichlet density> $1/\varphi(q)$.
Finally, for real $s>1$ each <prime> satisfies
$$
p^{-s}=s\int_p^\infty t^{-s-1}\,dt.
$$
The integrands are nonnegative, so <Tonelli theorem> permits summation inside the integral. At a fixed $t$, exactly $\pi(t,q,a)$ <primes> from the <residue class> have entered. Therefore
$$
\boxed{\sum_{p\equiv a\pmod q}\frac1{p^s}
=s\int_1^\infty\frac{\pi(t,q,a)}{t^{s+1}}\,dt.}
$$
Both sides are finite, since they are bounded respectively by $\sum_{n\ge2}n^{-s}$ and $s\int_1^\infty t^{-s}\,dt$. The values of a counting function at its isolated jump endpoints do not change this integral.
Back to article page