What Is the Number of Partitions with Distinct Parts?

Here is an essential overview about What Is the Number of Partitions with Distinct Parts.

Input: n = 2 Output: 2 1 1 Input: n = 3 Output: 3 2 1 1 1 1 Note: 2+1 and 1+2 are considered as duplicates. Input: n = 4 Output: 4 3 1 2 2 2 1 1 1 1 1 1 Recommended: Please solve it on “ PRACTICE ” first, before moving on to the solution.

What are the Partitions of n into k parts?

Now consider the partitions of n into k parts. Some of these partitions contain no 1s, like 3+ 3+4+ 6, a partition of 16 into 4 parts. Subtracting 1 from each part, we get a partition of n− k into k parts; for the example, this is 2 +2+ 3+5. The remaining partitions of n into k parts contain a 1.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest