FUNCTION: partitions[PDP] - Number of partitions of n (hard way)
CALLING SEQUENCE: PDP(n)
PARAMETERS: n - nonnegative integer
GLOBAL VARIABLES:
SYNOPSIS:
PDP(n) computes p(D,n) the hard way (by counting a list of partitions)
p(D,n) is the number of partitions of n into distinct parts
EXAMPLES:
> with(qseries):
> with(partitions):
> PDP(9);
8
> series(etaq(q,2,12)/etaq(q,1,12),q,11);
2 3 4 5 6 7 8 9 10 11
1 + q + q + 2 q + 2 q + 3 q + 4 q + 5 q + 6 q + 8 q + 10 q + O(q )
DISCUSSION:
We see that p(D,9) = 8.
Confirmed from the generating function
SEE ALSO: ptnDP