Displaying 1 result from an estimated 1 matches for "tp23341171p23342887".
2009 May 01
2
Double summation limits
Dear R experts
I need to write a function that incorporates double summation, the problem
being that the upper limit of the second summation is the index of the first
summation, i.e:
sum_{j=0}^{x} sum_{i=0}^{j} choose(i+j, i)
where x variable or constant, doesn't matter.
The following code obviously doesn't work:
f=function(x) {j=0:x; i=0:j; sum( choose(i+j,i) ) }
Can you help?
Thanks