For partitions into distinct parts, using a part prevents using it again. Hence
when , with , for , and for . When , use . Thus change the second call in the final branch of P to D(i-1, n-i) and rename all calls to D. The same split into two disjoint classes proves correctness; its second class removes its unique largest allowed part. The answer is , giving , from and .

Articles by others on the same topic (0)

There are currently no matching articles.