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

Mathematical integer partitions: enter a target N and list every positive-integer addition that sums to N. Reordering alone counts as the same partition (5 = 4 + 1 and 5 = 1 + 4 count once), and the count is the partition number p(N).
Partitions grow extremely fast: p(20) = 627, p(50) = 204226, p(200) ≈ 3.97 × 10¹², so a target cap of 200, an output cap on combinations, and a table-row cap are enforced; excess is truncated automatically with a notice. Enumeration is lazy and stops once enough are gathered; counts use BigInt in a two-dimensional recurrence, so even at N up to 200 there is never a precision error.

How to use

  1. Enter one target per line, such as 5, 10, 20; you may paste many lines at once.
  2. Choose a mode:
       · All partitions: list one by one, such as 5 = 4 + 1, 5 = 3 + 2, 5 = 3 + 1 + 1…;
       · Group by number of addends: which partitions use 1 addend, 2 addends, 3 addends, with the true count of each group;
       · Count only: return just p(N), such as p(100) = 190569292;
  3. The connector can be changed to ,, |, and so on (left empty it defaults to +).
  4. Results support one-click copy and CSV export.

Message board

All messages →
0/200

  • No one has spoken up yet — want to go first?