ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 10 Jun 2013 17:58:24 +0200How to compute an iterated product in Sagehttps://ask.sagemath.org/question/10219/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?JoshIzzardMon, 10 Jun 2013 17:58:24 +0200https://ask.sagemath.org/question/10219/