# How can I get the coefficient of a Dirichlet series?

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hello.

Let's see this example.

g(x)=(1-3^(-x))*(f(x))^2


where f(x) is the Riemann zeta function and x is complex variable.

If Re(s) is sufficiently large then g(x) is converges.

We only view this g(x) as a formal Dirichlet series.

What I want is coefficients.

The Riemann zeta function is rewritten by

f(x)=1+2^(-x)+3^(-x)+ ...


We can also rewrite the g(x) by the sum of a_n * n^(-x).

g(x)=sum{a_n * n^(-x) | n=1,2,...}


For given n, how can I get a_n ??

Is there any helpful sage command ??

Thanks.

edit retag close merge delete

It's not a power series, it's a Dirichlet series, see https://en.wikipedia.org/wiki/Dirichl...

( 2015-04-16 09:01:41 +0100 )edit

I see. I edited the title. Thanks.

( 2015-04-16 15:11:17 +0100 )edit

Sort by ยป oldest newest most voted
more

The question will be resolved as soon as the ticket is reviewed. What coincidence...

( 2015-04-16 09:00:18 +0100 )edit

That's awesome. Very useful information. Thanks. But I'm not sure how to use the commands in the "Dirichlet_series.sage" in order to (1-3(-s))*zeta__series(n)^2. How to control "s"??

( 2015-04-16 15:28:56 +0100 )edit

Your x is usually named s (just a convention with complex variables), and to get the coefficients you would issue the commands (I have done it using a development version):

sage: s=var('s')
sage: dirichlet_series((1-3^(-s))*zeta(s)^2).list(20)
[1, 2, 3, 3, 2, 6, 2, 4, 6, 4, 2, 9, 2, 4, 6, 5, 2, 12, 2, 6]

( 2015-04-16 18:23:52 +0100 )edit

I found "dirichlet_series.py". It contains "Copyright (C) 2015 Ralf Stephan". Maybe that's the development version you said. But I have some problem.

sage: s=var('s')
sage: dirichlet_series(zeta(s))
<repr(<sage.all_cmdline.DirichletSeries at 0x115ae6490>) failed: AttributeError: 'sage.libs.pari.gen.gen' object has no attribute 'dirmul'>
sage: dirichlet_series(1)
<repr(<sage.all_cmdline.DirichletSeries at 0x115ae68d0>) failed: AttributeError: 'sage.libs.pari.gen.gen' object has no attribute 'dirmul'>


Hmm.. It doesn't work. How to solve that problem?

( 2015-04-17 06:47:11 +0100 )edit

Wait until release. You see, if you do not know how to deal with a possible bug in a development branch on trac, then you are not supposed to use it, anyway.

( 2015-04-17 10:25:52 +0100 )edit