Integer Partition Generator
One target number per line - list every addition combination that sums to it, group them by addend count, or count them
Mode:
Max results:
Separator:
Calculation Result
Download CSV
| No. | Target | Addends | Combination | Number of combinations |
|---|
Introduction to the tool and how to use it
Integer partitions, explained plainly: type a target number N and get every addition combination of positive integers that sums to N. Reordering the same addends counts as one combination (5 = 4 + 1 and 5 = 1 + 4 are the same), and the total is the partition number p(N).
How to use:
1. One target number per line, e.g.
2. Pick a mode:
- All combinations: list them one by one, e.g.
- Group by addend count: see which combinations use 1, 2, 3... addends, plus the exact size of each group;
- Count only: return just p(N), e.g.
3. The joiner can be
4. Copy the result or export it as CSV.
Partition counts explode fast: p(20) = 627, p(50) = 204226, p(200) is about 3.97 x 10^12, so the tool caps the target at 200 and limits both the number of listed combinations and the number of table rows, trimming silently with a notice. Enumeration is lazy and stops as soon as it has enough, while counting uses a BigInt two-dimensional recurrence, so nothing is rounded even at N = 200.
How to use:
1. One target number per line, e.g.
5, 10, 20 - paste as many lines as you like;2. Pick a mode:
- All combinations: list them one by one, e.g.
5 = 4 + 1, 5 = 3 + 2, 5 = 3 + 1 + 1...;- Group by addend count: see which combinations use 1, 2, 3... addends, plus the exact size of each group;
- Count only: return just p(N), e.g.
p(100) = 190569292;3. The joiner can be
,, | or anything else (empty falls back to +);4. Copy the result or export it as CSV.
Partition counts explode fast: p(20) = 627, p(50) = 204226, p(200) is about 3.97 x 10^12, so the tool caps the target at 200 and limits both the number of listed combinations and the number of table rows, trimming silently with a notice. Enumeration is lazy and stops as soon as it has enough, while counting uses a BigInt two-dimensional recurrence, so nothing is rounded even at N = 200.
Message board
All messages →-
No one has spoken up yet — want to go first?