Algorithm 448: number of multiply-restricted partitions | Synapse