CombinatorialFunctionCategoryΒΆ

trigcat.spad line 217 [edit on github]

Category for the usual combinatorial functions.

binomial: (%, %) -> %

binomial(n, r) returns the (n, r) binomial coefficient (often denoted in the literature by C(n, r)). Note: C(n, r) = n!/(r!(n-r)!) where n >= r >= 0.

factorial: % -> %

factorial(n) computes the factorial of n (denoted in the literature by n!) Note: n! = n (n-1)! when n > 0; also, 0! = 1.

permutation: (%, %) -> %

permutation(n, m) returns the number of permutations of n objects taken m at a time. Note: permutation(n, m) = n!/(n-m)!.