Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to compute an iterated product in Sage

I am wondering about how to define a function f(n, k, i) that will take inputs n, k, i and give me the following product: $$ \prod_{\ell = 1}^i {n + k - \ell \choose k} $$ So for $i = 2$, this would look like ${n + k - 1 \choose k}\cdot {n + k - 2 \choose k}$. Would I use a for loop to iteratively add to the product until all i terms were accounted for?