numbcomp - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


combinat

  

numbcomp

  

the number of k-compositions of an integer

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

numbcomp(n, k)

Parameters

n, k

-

any integers

Description

• 

The numbcomp command counts the number of distinct ordered k-tuples of positive integers whose elements sum to n. For information on the composition command, which constructs k-compositions, see the combinat[composition] help page.

• 

Note that numbcomp⁡n,k⁢=nops⁡composition⁡n,k=binomial⁡n−1,k−1 for n,k>0 .

Examples

> 

with⁡combinat,numbcomp

numbcomp

(1)
> 

numbcomp⁡7,3

15

(2)
> 

numbcomp⁡5,4

4

(3)

See Also

combinat[composition]