Solution (source code)

= Solution

Extend each <Dirichlet character> periodically to all integers by setting $\chi(n)=0$ when $\gcd(n,N)>1$. Its <Dirichlet L-function> is initially the absolutely convergent <Dirichlet series>
$$
\boxed{L(\chi,s)=\sum_{n\geq1}\frac{\chi(n)}{n^s}
\quad(\operatorname{Re}s>1).}
$$
The group $(\mathbb Z/N\mathbb Z)^\times$ has $\varphi(N)$ elements. Part (i) gives, for every integer $n$, including nonunits,
$$
\sum_{\chi\in\widehat G}\chi(a)^{-1}\chi(n)
=\varphi(N)\,\mathbf1_{n\equiv a\bmod N}.
$$
For a nonunit both sides are zero, because the fixed class $a$ is a unit. Interchanging the finite character sum and the absolutely convergent <Dirichlet series> therefore proves
$$
\boxed{\sum_{\chi\in\widehat G}\chi(a)^{-1}L(\chi,s)
=\varphi(N)\sum_{n\geq1\atop n\equiv a\bmod N}n^{-s}
\quad(\operatorname{Re}s>1).}
$$
This is <Orthogonality of Dirichlet characters> applied to a residue-class indicator. Any meromorphic continuations of the two sides agree by uniqueness of <analytic continuation>.