binomial - Maple Help

binomial

compute binomial coefficients

Calling Sequence

 binomial(n, r) $\left(\genfrac{}{}{0}{}{n}{r}\right)$

Parameters

 n, r - expressions

Description

 • The binomial(n,r) function computes binomial coefficients.
 • You can enter the command binomial using either the 1-D or 2-D calling sequence. For example, binomial(n, 2) is equivalent to $\left(\genfrac{}{}{0}{}{n}{2}\right)$ .
 • If the arguments are both non-negative integers with $0\le r\le n$, then $\mathrm{binomial}\left(n,r\right)=\frac{n!}{r!\left(n-r\right)!}$, which is the number of distinct sets of r objects that can be chosen from n distinct objects.
 • If n and r are integers that do not satisfy $0\le r\le n$, or $n$ and $r$ are rationals or floating-point numbers, then the general definition is used, that is,

$\left(\genfrac{}{}{0}{}{n}{r}\right)=\frac{\mathrm{\Gamma }\left(n+1\right)}{\mathrm{\Gamma }\left(r+1\right)\mathrm{\Gamma }\left(n-r+1\right)}$

 • At all points $n,r$ where none of $n$, $r$, and $n-r$ is a negative integer, the above definition is equivalent to:

$\left(\genfrac{}{}{0}{}{n}{r}\right)=\underset{t\to 0}{lim}\frac{\mathrm{\Gamma }\left(n+t+1\right)}{\mathrm{\Gamma }\left(r+1\right)\mathrm{\Gamma }\left(n+t-r+1\right)}$

 In the case that $n$ is a negative integer, binomial(n,r) is defined by this limit. If $r$ is a negative integer, by the symmetry relation binomial(n,r) = binomial(n,n-r), the above limit is used.
 In the case that exactly two of the expressions $n$, $r$, and $n-r$ are negative integers, Maple also signals the invalid_operation numeric event, allowing the user to control this singular behavior by catching the event. See numeric_events for more information.
 • For symbolic arguments, some simplifications, for example, binomial(n, 1) = n, can be made, but typically binomial returns unevaluated.

Examples

 > $\mathrm{binomial}\left(4,2\right)$
 ${6}$ (1)
 > $\mathrm{binomial}\left(2,\frac{1}{2}\right)$
 $\frac{{16}}{{3}{}{\mathrm{π}}}$ (2)
 > $\mathrm{binomial}\left(2.1,2+3I\right)$
 ${-}{56.56167619}{-}{98.27156511}{}{I}$ (3)
 > $\mathrm{binomial}\left(n,2\right)$
 ${\mathrm{binomial}}{}\left({n}{,}{2}\right)$ (4)
 > $\mathrm{expand}\left(\right)$
 $\frac{{1}}{{2}}{}{{n}}^{{2}}{-}\frac{{1}}{{2}}{}{n}$ (5)
 > $\mathrm{NumericStatus}\left(\mathrm{invalid_operation}=\mathrm{false}\right):$
 > $\mathrm{binomial}\left(-3,5\right)$
 ${-}{21}$ (6)
 > $\mathrm{NumericStatus}\left(\mathrm{invalid_operation}\right)$
 ${\mathrm{true}}$ (7)