Integer Partition Generator
List every unordered positive-integer partition of a target from 1 to 30. For 5, generate seven sums including 1+4 and 5.
Start using
Integer Partition Generator
List every unordered positive-integer partition of a target from 1 to 30. For 5, generate seven sums including 1+4 and 5.
Integer Partition Generator
The tool accepts one whole target integer from 1 through 30. It lists additive integer partitions: every result uses positive whole numbers whose sum equals the target. Zero, negative values, decimals, missing input and values above 30 are rejected before enumeration.
Terms within each result are nondecreasing, so order-only duplicates are omitted. For target 5 the seven lines are 1+1+1+1+1, 1+1+1+2, 1+1+3, 1+2+2, 1+4, 2+3 and 5. The single-term partition is included.
The recursive search tries each next term from the previous minimum through the remaining total. This makes 1+4 and 4+1 the same partition and emits only 1+4. At the maximum target 30 there are 5,604 integer partitions, below the tool's 10,000-line output safeguard.
This is not a permutation generator, fixed-number-of-addends worksheet, probability calculator or solver for decimal and negative summands. It does not show a separate partition count, exclude the target itself, require two terms, or randomize the order. Plus signs and ASCII digits are used in the copied result in every locale.
Enter a target no larger than 30, press Calculate, verify that a sample line sums to the target, then copy the newline-separated list. Calculation is browser-local. Output grows quickly with the target, so a smaller number is easier to inspect on mobile and better when only a short teaching example is needed.
Processing takes place locally in your browser.