binomial - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


binomial

compute binomial coefficients

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

binomial(n, r)

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  .

• 

If the arguments are both non-negative integers with , then , 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 , or  and  are rationals or floating-point numbers, then the general definition is used, that is,

• 

At all points  where none of , , and  is a negative integer, the above definition is equivalent to:

  

In the case that  is a negative integer, binomial(n,r) is defined by this limit. If  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 , , and  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.

• 

For positive integer arguments, binomial is computed using GMP. A limited number of previous computed values will be cached and new values will be computed using a recurrence formula.  In practice that means that it is very fast to compute sequences of binomial coefficients for fixed values of  or .

Examples

(1)

(2)

(3)

(4)

(5)

(6)

(7)

computing sequences of binomial coefficients is optimized to be faster than computing each one in isolation

(8)

See Also

combinat

combinat[multinomial]

combinat[numbcomb]

expand

GAMMA

initialfunctions

numeric_events

NumericStatus

 


Download Help Document