Search code examples
mathwolfram-mathematicaseriescalculus

How To Do Multiple Series In Mathematica


Consider Expression Below: enter image description here

Where "Gamma" and "k" given (user input).depending on "Gamma" value,number of Multiple series may change.any ideas how can I put this on mathematica?I Can't Use Nested Loop ('For' Loop) because number of loops may change by changing "Gamma" value.


Solution

  • This should be close:

     inner[i_, gamma_, k_] :=
        Sum[(-1)^(el[1])/el[1]!
            Product[(-1)^(el[z] - el[z - 1])/(el[z] - el[z - 1])! ,{z, 2, i}], 
           Evaluate[Sequence @@ 
              ({{el[1], k, gamma}}~Join~Table[ { el[ii], el[ii - 1], gamma },
                      {ii, 2, i}])]]
    
    
     With[{gamma = 3, k = 1}, Sum[ inner[i, gamma, k], {i, gamma - 1}]]
    

    -4/3

    by the way the product is slightly neater if you define el[0]=0 then it is simply:

     Product[(-1)^(el[z] - el[z - 1])/(el[z] - el[z - 1])! , {z,i}]
    

    which then simplifies to:

     (-1)^el[i] /Product[(el[z] - el[z - 1])! , {z, 1, i}]