type/partition
check for an integer partition
Calling Sequence
Parameters
Description
Examples
type( expr, 'partition' )
expr
-
anything; any Maple expression
The call type( expr, 'partition' ) returns true if expr is a partition of a positive integer, and returns false otherwise.
A partition of a positive integer n is a list [ k1,...,kr]. of positive integers ki, whose sum is equal to n, and which is non-decreasing, that is, which satisfies add⁡ki,i=1..r=n and ki≤ki+1, for i in 1..r−1.
type⁡1,2,3,4,partition
false
type⁡1,2,23,partition
type⁡1,−2,3,partition
type⁡1,2,3,partition
true
type⁡1,2,3,3,4,partition
type⁡1,2,3,3,2,partition
See Also
combinat/partition
type/permlist
Download Help Document