Integer Partition Generator
Generates a random partition of a small whole number (6-20) into positive whole-number parts that add back up to the total.
What this generator does
Produces a way of writing a number as a sum of positive whole numbers. Partitions are a classic combinatorics topic and useful for splitting a total into parts in puzzles and test data.
How to use this tool
- Press generate for a random integer partition.
Worked examples
- Example shape
- 7 → 3 + 2 + 1 + 1
Common use cases
- Introducing the concept of number partitions
- Quick maths puzzles
- Teaching examples for combinatorics
Limitations and good to know
- The tool returns one partition, not all of them. The number of partitions grows extremely fast — 50 already has more than two hundred thousand.
Related generators
- Knapsack Problem Generator0/1 knapsack instances solved exactly by dynamic programming, with the value-per-weight answer shown alongside for comparison.
- Geometric Sequence GeneratorA random geometric sequence with a whole-number ratio.
- Percentage Split GeneratorSplits 100% into three random parts that always add up correctly.
- Random Partition GeneratorSplits a whole number into random parts that add back up to it exactly, with no part rounded away.