GenerateRandomSearch

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

  1. 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.