Jacques Gélinas on Fri, 15 Feb 2019 22:20:17 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

RE: Evaluating Multiple Sums in PARI/GP


Good question.

Recursion is available to implement multiple sums.

Also there is the vecsum function, perhaps in conjunction with
the [ f(x) | x<- [...]] set notation defined in the reference card:
http://pari.math.u-bordeaux.fr/pub/pari/manuals/2.11.0/refcard.pdf
Finally, note this Gnuplot (!) device to implement the sum of a series

f(k,u,n)=n==1?q(k,u):exp(-(n**2-1)*u)*n**(2*k+4)*q(k,n**2*u)+f(k,u,n-1)

q(k,u) =  k==0?q0(u):k==1?q1(u):k==2?q2(u):k==3?q3(u):k==4?q4(u):q5(u)
q0(u) = 2. - 3./u
q1(u) = 8. - 30./u + 15./u**2
............................................................

Jacques Gélinas



De : kevin lucas <lucaskevin296@gmail.com>
Envoyé : 15 février 2019 12:28
À : pari-users@pari.math.u-bordeaux.fr
Objet : Evaluating Multiple Sums in PARI/GP
 
I recently ran into problems attempting to formulate a PARI program that evaluated the expression



sum(((-1)^(a+b+c))/(a^2 + b^2 + c^2)^s)


for various complex values of s, with a,b,c running over Z^3/{(0,0,0)}. How should I attempt this? More generally, how should one set up iterated alternating sums like these? If, for instance I also wanted the eight-dimensional version of the above sum, how would I compute it?


As always any help and especially references are welcome.


Kevin