# Question about direuler command in Pari/GP

From the Pari/GP users guide:

3.4.16 direuler(p=a,b,expr,{c}).

Computes the Dirichlet series associated to the Eulerproduct of expression expr as p ranges through the primes from a to b. expr must be a polynomial or rational function in another variable than p (say X) and expr(X) is understood as the local factor expr(p−s). The series is output as a vector of coefficients. If c is present, output only the first c coefficients in the series.

The following command computes the sigma function, associated to $$\zeta {(s)} \zeta {(s-1)} :$$

?direuler(p=2,10,1/((1-X)(1-pX)))

%1=[1,3,4,7,6,12,8,15,13,18]

Question: I don't understand the direuler command, please explain. For example: how would I create the series for $\frac{1}{\zeta {(s)}},$ and $\frac {\zeta {'(s )}}{\zeta {(s)}} ?$

EDIT:

Trial and error gives that the answer to the first question is: direuler (p=2,100,(1-s)) gives $\frac{1}{\zeta {(s)}}$, but I don't understand why.

Let's start with the definition of $\zeta(s)$ as an Euler product : $$\tag{1}\zeta(s)=\prod_{p} \frac 1{1-p^{-s}}$$ A variable $x$ in the third parameter "expr" is in fact $\,x:=p^{-s}$.
Using this substitution we deduce that $\zeta(s)$ will be given by a product of terms $\dfrac 1{1-x}$ :

> direuler(p=2,10,1/(1-x))
= [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]


Since $\;\displaystyle\zeta(s-1)=\prod_{p} \frac 1{1-p^{-s+1}}=\prod_{p} \frac 1{1-p\cdot p^{-s}}\;$ we deduce that $\zeta(s-1)$ will be given by :

? direuler(p=2,10,1/(1-p*x))
= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]


and their product $\;\zeta(s)\,\zeta(s-1)\,$ will be your first result :

? direuler(p=2,10,1/(1-x)/(1-p*x))
= [1, 3, 4, 7, 6, 12, 8, 15, 13, 18]


Concerning $\dfrac 1{\zeta(s)}\,$ you have simply to reverse the product $(1)$ to get your second result :

? direuler(p=2,10,1-x)
= [1, -1, -1, 0, -1, 1, -1, 0, 0, 1]


Corresponding to dirdiv(vector(10,k,k==1),vector(10,k,1)) or :

> vector(10,k,moebius(k))
= [1, -1, -1, 0, -1, 1, -1, 0, 0, 1]


Concerning $\;\frac {\zeta'(s)}{\zeta(s)}\,=\log(\zeta(s))'\;$ this is a sum rather than a product so let's use the Dirichlet representation of $\,\displaystyle\zeta'(s)=-\sum_{k=1}^\infty \frac {\log(k)}{k^{s}}\,$ (since $(k^{-s})'=-\log(k)\,p^{-s}$) and get if I didn't make an error... :

> \p 6
> dirdiv(vector(10,k,-log(k)), vector(10,k,1))
= [0, -0.693147, -1.09861, -0.693147, -1.60944, 0.E-9, -1.94591, -0.693147, -1.09861, -4.65661 E-10]


Hoping this clarified things,

• Completely, the answer I was hoping for, thank you. – nilo de roock Mar 17 '15 at 13:47
• Glad it helped @ndroock1. Excellent continuation! – Raymond Manzoni Mar 17 '15 at 13:50