combinat - Maple Programming Help

Home : Support : Online Help : Mathematics : Discrete Mathematics : Combinatorics : combinat : combinat/numbpart

combinat

 numbpart
 The number of partitions of an integer

 Calling Sequence numbpart(n, m)

Parameters

 n - non-negative integer; integer to partition m - (optional) non-negative integer; maximum integer in partitions

Description

 • 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\le n$.
 • The command with(combinat,numbpart) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{combinat}\right):$
 > $\mathrm{numbpart}\left(5\right)$
 ${7}$ (1)
 > $\mathrm{partition}\left(5\right)$
 $\left[\left[{1}{,}{1}{,}{1}{,}{1}{,}{1}\right]{,}\left[{1}{,}{1}{,}{1}{,}{2}\right]{,}\left[{1}{,}{2}{,}{2}\right]{,}\left[{1}{,}{1}{,}{3}\right]{,}\left[{2}{,}{3}\right]{,}\left[{1}{,}{4}\right]{,}\left[{5}\right]\right]$ (2)
 > $\mathrm{numbpart}\left(6,3\right)$
 ${7}$ (3)
 > $\mathrm{partition}\left(6,3\right)$
 $\left[\left[{1}{,}{1}{,}{1}{,}{1}{,}{1}{,}{1}\right]{,}\left[{1}{,}{1}{,}{1}{,}{1}{,}{2}\right]{,}\left[{1}{,}{1}{,}{2}{,}{2}\right]{,}\left[{2}{,}{2}{,}{2}\right]{,}\left[{1}{,}{1}{,}{1}{,}{3}\right]{,}\left[{1}{,}{2}{,}{3}\right]{,}\left[{3}{,}{3}\right]\right]$ (4)