On Wed, Jun 10, 2009 at 4:14 PM, Ton Biegstraaten<ton.biegstraa...@gmail.com> wrote: > Hi, > As an example I multiplied the first terms of 2 Dirichlet powerseries. The > result is also a Dirichlet powerserie, but how do I get the result in that > shape? > --- > > sage: a(x) = sum([1/(n^x) for n in range(1,4)]) > sage: b(x) = a(x)*a(x) > sage: print "a(x): ",a(x), "\nproduct: ", a(x)*a(x), "\nb(x): ", > b(x).expand() > a(x): 1/2^x + 1/3^x + 1 > product: (1/2^x + 1/3^x + 1)^2 > b(x): 2/2^x + 1/(2^x)^2 + 2/3^x + 2/(2^x*3^x) + 1/(3^x)^2 + 1 > --- > > I like to get things like 2^x*3^x => 6^x and combine all n^x terms, as I'm > only interested in the denominators of that terms. > The result should be: > 1 + 2/2^x + 2/3^x + 3/4^x ... > each denominator is the number of divisors of the number in the nominator if > you use enough terms in the original series. > Is that possible and of course how?
You should read this wiki page, which should explain to you how to code up the Dirichlet convolution, hence explicit form of product of two Dirichlet series as a Dirichlet series: http://en.wikipedia.org/wiki/Dirichlet_convolution William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---