Dirichlet L-series and Gamma function question Could someone help me, please, with this exercise?
Consider a sequence of complex numbers $\{a_n\}$ such that $a_n=a_m $ iff $ n\cong m $   mod $q$ for some positive integer $q$.
Define the Dirichlet L-series associated to the sequence by
$$L(s)=\sum_{n=1}^{\infty} \frac{a_n}{n^s} \ \ \  \text{  for   Re}(s)>1. $$ 
Also define $$M(x)=\sum_{m=0}^{q-1}a_{q-m} e^{mx}\ \ \ \text{  with   }\ \  a_0=a_q.$$
Questions


*

*How can we show that 
$$
L(s)=\frac{1}{\Gamma(s)}\int_{0}^{\infty}\frac{M(x)x^{s-1}}{e^{qx}-1}dx,  \ \ \text{for   Re}(s)>1 ?
$$
Note: $\Gamma(s)$ is the Gamma function.

*How does that imply $L(s)$ is continuable into the complex plane, with the only
possible singularity a pole at $s=1$.


Any help is really appreciated.
 A: (1) Hint: write
$$
\frac{1}{\Gamma(s)}\int_{0}^{\infty}\frac{M(x)x^{s-1}}{e^{qx}-1}dx = \frac{1}{\Gamma(s)} \sum_{m=0}^{q-1} \int_{0}^{\infty}\frac{a_{q-m}e^{mx}x^{s-1}}{e^{qx}} \big( 1 + e^{-qx} + e^{-2qx} + e^{-3qx} + \cdots \big) \,dx
$$
and integrate term by term.
(2) Hint: in the equation you showed in part (1), write $M(x) = (M(x)-M(0))+M(0)$ and split into two integrals. The first integral should converge for any complex $s$, while the second integral will produce a pole at $s=1$.
A: (2) is essentially a slightly more complicated version of Exercise 16 from Chapter 6 in Stein and Shakarchi's Complex Analysis. We make use of Bernoulli numbers $B_n$.
Since $M(x) = \sum_{m=0}^{q-1} a_{q-m} e^{mx}$ is a finite sum, we only need to prove that for each $m$ in $\{0, 1, \dots, q-1\}$ , $\frac{1}{\Gamma(s)} \int_0^\infty \frac{e^{mx} x^{s-1}}{e^{qx}-1} dx$ is continuable into the complex plane.
We split the integral into two parts $$\frac{1}{\Gamma(s)} \int_0^{1/q} \frac{e^{mx} x^{s-1}}{e^{qx}-1} dx + \frac{1}{\Gamma(s)} \int_{1/q}^\infty \frac{e^{mx} x^{s-1}}{e^{qx}-1} dx.$$
The second integral deﬁnes an entire function, while for any fixed $s>1$
$$
\begin{eqnarray}
&&  \int_0^{1/q} \frac{e^{mx} x^{s-1}}{e^{qx}-1} dx \\
&=& \int_0^{1} \frac{e^{mx/q} x^{s-1}}{q^s(e^{x}-1)} dx \\
&=& \frac{1}{q^s}\int_0^{1} \sum_{n=0}^\infty \frac{B_n e^{mx/q} x^{n+s-2}}{n!} dx \\
&=& \frac{1}{q^s} \sum_{n=0}^\infty \frac{B_n}{n!} \int_0^{1} e^{mx/q} x^{n+s-2} dx \\
&=& \frac{1}{q^s} \sum_{n=0}^\infty \frac{B_n}{n!} \int_0^{1} \sum_{k=0}^\infty \frac{m^k x^{n+k+s-2}}{k! q^k} dx \\
&=& \frac{1}{q^s} \sum_{n=0}^\infty \sum_{k=0}^\infty \frac{B_n}{n!} \frac{m^k}{k! q^k} \int_0^{1}  x^{n+k+s-2} dx \\
&=& \frac{1}{q^s} \sum_{n=0}^\infty \sum_{k=0}^\infty \frac{B_n}{n!} \frac{m^k}{k! q^k} \frac{1}{n+k+s-1}.
\end{eqnarray}
$$
We were allowed to move the sums outside the integral because each time, the series inside the integral converges uniformly.
What remains is to prove this double sum, multiplied by $\frac{1}{\Gamma(s)}$, defines a meromorphic function on the complex plane with the only possible singularity a pole at $s = 1$.
For any $|s| \leq R$, this double sum can be split into two parts.
$$
\begin{eqnarray}
&&  \frac{1}{q^s} \sum_{n=0}^\infty \sum_{k=0}^\infty \frac{B_n}{n!} \frac{m^k}{k! q^k} \frac{1}{n+k+s-1}  \\
&=& \frac{1}{q^s} \sum_{n+k < R+2} \frac{B_n}{n!} \frac{m^k}{k! q^k} \frac{1}{n+k+s-1} + \frac{1}{q^s} \sum_{n+k \geq R+2} \frac{B_n}{n!} \frac{m^k}{k! q^k} \frac{1}{n+k+s-1}.
\end{eqnarray}
$$
The first part is the sum of a finite number of holomorphic functions of $s$, with simple holes at $\{1, 0, -1, \dots\}$, all which except the pole at 1 are cancelled by the zeros of $\frac{1}{\Gamma(s)}$.
The second part absolutely and uniformly converges and is therefore entire on $|s| \leq R$.
Finally we let $R \rightarrow \infty$ and this concludes the proof.
