1Function: binomial 2Section: combinatorics 3C-Name: binomial0 4Prototype: GDG 5Help: binomial(x,{k}): binomial coefficient x*(x-1)...*(x-k+1)/k! defined for 6 k in Z and any x. If k is omitted and x an integer, return the vector 7 [binomial(x,0),...,binomial(x,x)]. 8Doc: \idx{binomial coefficient} $\binom{x}{k}$. 9 Here $k$ must be an integer, but $x$ can be any PARI object. 10 \bprog 11 ? binomial(4,2) 12 %1 = 6 13 ? n = 4; vector(n+1, k, binomial(n,k-1)) 14 %2 = [1, 4, 6, 4, 1] 15 @eprog\noindent The argument $k$ may be omitted if $x = n$ is a 16 nonnegative integer; in this case, return the vector with $n+1$ 17 components whose $k+1$-th entry is \kbd{binomial}$(n,k)$ 18 \bprog 19 ? binomial(4) 20 %3 = [1, 4, 6, 4, 1] 21 @eprog 22