I am trying to write a function with two positive integer inputs (N and Z), so it would be f_Z(N). The function would have Z1 summations with the maximum value being NZ+1. The below should clarify. In the below, I use 'summa' as a linear form of sigma notation, where the the first argument is what is being summed, the second is the index to sum over, the third is the minimum value for the index and the last is the maximum. For example, summa(a^2,a,1,5) = 1^2+2^2+3^3+4^2+5^2=55.
f_1(N) = N
f_2(N) = 1+2+...+N = summa(a,a,1,N1)
f_3(N) = summa(summa(a,a,1,b),b,1,N2)
f_4(N) = summa(summa(summa(a,a,1,b),b,1,c),c,1,N3)
etc...
With some numbers to help:
f_4(8) = [(5+4+3+2+1)+(4+3+2+1)+(3+2+1)+(2+1)+(1)] + [(4+3+2+1)+(3+2+1)+(2+1)+(1)] + [(3+2+1)+(2+1)+(1)] + [(2+1)+(1)] + [(1)]
I hope this examples the function. I have tried to expand this and find a linear representation and tried recursive, but can't seem to get a good algorithm. The difficult arises in that the maximum index of one summation depends on the value of index outside of it. I tried looking online, but couldn't find examples with this type of index dependence.
Thank you for your help.
