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:
i∏ℓ=1(n+k−ℓk)
So for i=2, this would look like (n+k−1k)⋅(n+k−2k). Would I use a for loop to iteratively add to the product until all i
terms were accounted for?