Counting function and its Artin L-function I am working with the following function: given a polynomial, $P(x)$, with non-negative integer coefficients and passing through origin, we can define
$$f(d)=\{1\leq a\leq d \ | \ P(a)\equiv 0 \mod(d)\}$$
It is easy to see that $f$ is a multiplicative function. I am interested in the L-function associated with $f$, that is,
$$\sum_{n=1}^\infty \frac{f(n)}{n^s}=\prod_{p \ \text{prime}}\left(1+\sum_{k=1}^\infty\frac{f(p^k)}{p^{sk}}\right)^{-1}$$
I need to show the following that the above L-function is analytic in $\Re(s)>1$ and it has a pole of order $n$ at $s=1$ where $n$ is the degree of the polynomial $P(x)$. Any help would be much appreciated.
 A: The order of the pole at $s=1$ is the number of distinct irreducible factors.
Let $m\in \Bbb{Z}[x]$ monic and irreducible, $K=\Bbb{Q}[x]/(m(x))$.
$$f(n)=\# \{ a\bmod n, m(a)=0\bmod n\}$$
$f$ is clearly multiplicative. $m(x)\bmod p$ is separable when $p$ doesn't divide $Disc(m)$. For those primes Hensel lemma tells us that $f(p^k)=f(p)$ so that
$$F(s)=\sum_n f(n)n^{-s} = \prod_p (1+\sum_{k\ge 1} f(p^k) p^{-sk})$$ For the primes dividing the discriminant, I am thinking to the $\deg(m)$ roots of the polynomial in $\overline{\Bbb{Q}}_p$, for $k$ large enough there is a one-to-one correspondence between these and their reductions $\bmod p^k$. Not sure of the simplest argument $$=(\prod_{p\ | \ Disc(m)} (1+O(p^{-s}))\prod_{p\ \nmid\ Disc(m)} (1+f(p)\frac{p^{-s}}{1-p^{-s}})$$ $$=(\prod_{p\ | \ Disc(m)} (1+O(p^{-s}))\prod_{p\ \nmid\ Disc(m)} (1+f(p)p^{-s})(1+O(p^{-2s}))$$
For the primes not dividing the discriminant $f(p)$ is the number of prime ideals of $O_K$ with residue field $\Bbb{F}_p$ which means that
$$\prod_{P\ni p\subset O_K}\frac1{1-N(P)^{-s}}=
(1+O(p^{-2s}))\prod_{P\subset O_K,N(P)=p}\frac1{1-N(P)^{-s}}$$ $$=
 1+f(p)p^{-s}+O(p^{-2s})$$
And hence $$F(s)=\zeta_K(s)(\prod_{p\ |\ Disc(m)} (1+O(p^{-s})) (\prod_p (1+O(p^{-2s}))$$

Since $(s-1)\zeta_K(s)$ is entire then $(s-1)F(s)$ is analytic for $\Re(s)>1/2$.

For $m$ non-monic it works the same way, multiplying $Disc(m)$ by the leading coefficient of $m$.
For $m(x) = \prod_{j=1}^J m_j(x)^{e_j}$ reducible it is mostly the same as for the primes not dividing $Disc(\prod_{j=1}^J m_j)$ $$f(p^k)=\sum_jf_j(p^k),\qquad f_j(p^k)=\# \{ a\bmod n, m_j(a)=0\bmod p^k\}$$
Letting $K_j=\Bbb{Q}[x]/(m_j(x))$ then
$$F(s)=(\prod_{p\ |\ Disc(\prod_j m_j)} (1+O(p^{-s})) (\prod_p (1+O(p^{-2s})) \prod_{j=1}^J \zeta_{K_j}(s)$$ and hence $(s-1)^J F(s)$ is analytic for $\Re(s)> 1/2$.
