Macaulay2 » Documentation
Packages » Macaulay2Doc :: binomial
next | previous | forward | backward | up | index | toc

binomial -- binomial coefficient

Synopsis

Description

i1 : binomial(13,6)

o1 = 1716
i2 : binomial(-1,3)

o2 = -1

When either n or k are not ZZ objects, the Gamma function is used, i.e., $\binom{n}{k} = \frac{\Gamma(n + 1)}{\Gamma(k + 1)\Gamma(n - k + 1)}$.

i3 : binomial(7.5, pi)

o3 = 46.7647868824325

o3 : RR (of precision 53)

A polynomial may also be used for n.

i4 : R = QQ[x]

o4 = R

o4 : PolynomialRing
i5 : binomial(x + 3, 3)

     1 3    2   11
o5 = -x  + x  + --x + 1
     6           6

o5 : R

Ways to use binomial :

For the programmer

The object binomial is a method function.