How to determine the residue of an (arithmetic) Dirichlet series Consider a multiplicative function $f(n)$ that we write in the form $f(n) = h(n)n^a$ for a certain $a>0$ and $h(n)$ a multiplicative function such that $h(n) \asymp 1$ (more precisely, we can take $h(p^k) = (1-p^{-2})^3$ for all $k>0$, even if in fact I am interested in this function with two different values of $h(p)$ and $h(p^2)$). I denote the Dirichlet series $D_f(s)$ associated to $f$.
My question is: what is known about the poles and residues of $D_f$?
I can write what I believe to be true, but maybe extra hypotheses are needed on the function $h(n)$. At least $D_f$ converges for $\Re(s)>a+1$ by the bound on $f(n)$. I think it has a pole at $s=a+1$, and meromorphic continuation up to $\Re(s)>a$. I am particularly interested in the residue of $D_f(s)$ at $s=a$. I guess it is
$$R := \prod_p \left(1 - \frac 1p \right) \left( 1 + \frac{h(p)}{p} + \frac{h(p^2)}{p^2} + \cdots \right)$$
I would like to know if this is true, even up to adding some hypothesis, and why it is so. I thought of it as follows: we know the asymptotics
$$\sum_{n<x} f(n) = \sum_{n<x} h(n)n^a \sim R \frac{x^{a+1}}{a+1}$$
and we know that the Dirichlet series is related by Mellin transform to this partial sum, more precisely
$$D_f(s) = s \int_1^\infty x^{-s-1} \left(\sum_{n<x} f(n) \right) dx \sim \frac{Rs}{a+1} \int_1^\infty x^{a - s} dx \sim \frac{Rs}{(a+1)(a + 1 - s)} $$
Here the residue at $s=a+1$ is obviously $R$, but of course I cannot substitute that roughly the equivalent.
 A: *

*With $h(n)=\prod_{p| n} (1-p^{-2})^3$, $H(s)=\sum_n h(n)n^{-s}= \prod_p (1+(1-p^{-2})^3\frac{p^{-s}}{1-p^{-s}})$, $G(s)=\frac{H(s)}{\zeta(s)}=\sum_n g(n)n^{-s}$ you get that
$$G(s)= \prod_p (1-p^{-s})(1+(1-p^{-2})^3\frac{p^{-s}}{1-p^{-s}})=\prod_p (1-p^{-2s}+(1-p^{-s})((1-p^{-2})^3\frac{p^{-s}}{1-p^{-s}}-p^{-s})) $$
from which $g(p)=0,g(p^k)=O(1)$ so that $\sum_{n\le x} |g(n)| = O(x^{1/2+\epsilon}),\sum_{n> x} g(n)/n = O(x^{-1/2+\epsilon})$ and

$$\sum_{n\le x}h(n)= \sum_{d\le x}g(d) \lfloor x/d\rfloor= \sum_{d\le x}x\frac{g(d)}{d}+\sum_{d\le x} O(g(d))=x (G(1)+O(x^{-1/2+\epsilon}))+O(x^{1/2+\epsilon})$$

*

*Next $\log (1+(1-u)^3 \frac{v}{1-v})$ is analytic for $|u|<2r,|v|<2r$ (we don't really care of $r$ just that it is $\in (0,1/2)$) so that for $|u|\le r,|v|\le r$, $\log (1+(1-u)^3 \frac{v}{1-v})=\sum_{m,l} c_{m,l} u^l v^m=\sum_m c_{m,0} v^m+O(u)$ from some coefficients $c_{m,l}\in \Bbb{Q}$ and for $|p^{-s}|\le r$ $$\log (1+(1-p^{-2})^3\frac{p^{-s}}{1-p^{-s}})=\sum_{m\le M} c_{m,0}p^{-sm} +O(p^{-sM})+O(p^{-2})$$
Thus for $\Re(s) > 1/M$ $$\log H(s)-\sum_{p\le r^{-M}}\log (1+(1-p^{-2})^3\frac{p^{-s}}{1-p^{-s}})= \sum_{m\le M}c_{m,0}\sum_{j\le M} \frac{\mu(j)}{j} \log \zeta(smj))+\sum_p O(p^{-sM})$$ $$=\sum_{d\le M} \log \zeta(sd)\sum_{m| d} c_{m,0} \frac{\mu(d/m)}{d/m}+\sum_p O(p^{-sM})$$


*Since the $\sum_p O(p^{-sM})$ term is analytic for $\Re(s)>1/M$ you got the analytic continuation of $H(s)$ to $\Re(s)>1/M$ with some pole/zero/branch point at $1/d$ and $\rho/d$ whenever $\sum_{m| d} c_{m,0} \frac{\mu(d/m)}{d/m}$ is non-zero and/or not an integer, plus some trivial zeros coming from the Euler factors.
It is supposedly obvious that $\sum_{m| d} c_{m,0} \frac{\mu(d/m)}{d/m}$ won't be zero for all $d$ large enough so that $H(s)$ has infinitely many poles/zeros/branch points accumulating near $\Re(s)=0$ (a natural boundary with no analytic continuation beyond).
