Maxima Function
num_distinct_partitions (n)
num_distinct_partitions(n,list)
Returns the number of distinct integer partitions of n
when n is a nonnegative integer.
Otherwise, num_distinct_partitions
returns a noun expression.
num_distinct_partitions(n, list)
returns a
list of the number of distinct partitions of 1, 2, 3, ..., n.
A distinct partition of n is a list of distinct positive integers k_1, ..., k_m such that n = k_1 + ... + k_m.
Examples:
(%i1) num_distinct_partitions (12); (%o1) 15 (%i2) num_distinct_partitions (12, list); (%o2) [1, 1, 1, 2, 2, 3, 4, 5, 6, 8, 10, 12, 15] (%i3) num_distinct_partitions (n); (%o3) num_distinct_partitions(n)