combinat
numbpart
The number of partitions of an integer
Calling Sequence
Parameters
Description
Examples
numbpart(n, m)
n
-
non-negative integer; integer to partition
m
(optional) non-negative integer; maximum integer in partitions
This procedure counts the number of partitions of an integer n, that is, the number of ways n can be split into sums without regard to order.
See the partition function that constructs the partitions. Note that numbpart(n) = nops(partition(n)) for 0≤n.
The command with(combinat,numbpart) allows the use of the abbreviated form of this command.
with⁡combinat:
numbpart⁡5
7
partition⁡5
1,1,1,1,1,1,1,1,2,1,2,2,1,1,3,2,3,1,4,5
numbpart⁡6,3
partition⁡6,3
1,1,1,1,1,1,1,1,1,1,2,1,1,2,2,2,2,2,1,1,1,3,1,2,3,3,3
See Also
combinat[partition]
Download Help Document