up
previous
next
NumPartitions
-- number of partitions of an integer
Syntax
NumPartitions(N: INT): INT
Description
This function returns the number of partitions of a non-negative integer, i.e. the number of distinct ways of writing
N
as a sum of positive integers.
Example
/**/ NumPartitions(2); -- 2 and 1+1 2 /**/ NumPartitions(5); 7