Macaulay2 » Documentation
Packages » Python » PythonObject » binomial(PythonObject,PythonObject)
next | previous | forward | backward | up | index | toc

binomial(PythonObject,PythonObject) -- binomial coefficient for Python objects

Description

This computes the number of k-element subsets of a set with n elements.

i1 : binomial(toPython 4, toPython 2)

o1 = 6

o1 : PythonObject of class int

If one of the arguments is a Macaulay2 object, then it is first converted to a Python object.

i2 : binomial(toPython 12, 3)

o2 = 220

o2 : PythonObject of class int
i3 : binomial(15, toPython 10)

o3 = 3003

o3 : PythonObject of class int

See also

Ways to use this method:


The source of this document is in Python/doc/number-theory.m2:32:0.