McLaughlin, James on Wed, 01 Jun 2011 22:42:17 +0200


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

Multiple Summation Question


How can I set up a program to do multiple summation of the form, say,

Sum_{j_1=1}^1 Sum_{j_2=1}^2 … Sum_{j_k=1}^k  ( j_1^j_1+ j_2^j_2 + j_k^j_k) that will work for any integer k >=1?

 

What I would like is a single program that would compute the value of this sum for an particular, after specifying the only the value of k.

My problems are that I do not know how to write a program that creates the k different summation variables j_1, … j_k after specifying only what particular value k has, and even if I can define these summation variables, how do I set up the k-fold summation Sum_{j_1=1}^1 Sum_{j_2=1}^2 … Sum_{j_k=1}^k .

 

Thanks for any help.

 

Jimmy Mc Laughlin

PS The _expression_ ( j_1^j_1+ j_2^j_2 + j_k^j_k) above whose sum I wish to compute is just for illustration purposes, the sum I really want to compute is more complicated.