Partition Number Calculator
Enter a non-negative integer to compute p(n) — the count of ways to write it as an ordered sum — and browse all partitions for n ≤ 20.
Enter an integer n
Partitions listed for n ≤ 20
Quick examples
Result
Enter a value and click Compute.
Number of partitions of n
—
Sequence p(0) … p(n)
All partitions of n
Copied!
Summary
Enter a non-negative integer to compute p(n) — the count of ways to write it as an ordered sum — and browse all partitions for n ≤ 20.
How it works
- Enter a non-negative integer n in the input field.
- The calculator computes p(n) using Euler's recurrence relation in O(n√n) time.
- For n ≤ 20, every distinct partition is listed (e.g. 4 = 3+1 = 2+2 = 2+1+1 = 1+1+1+1).
- Above n = 20, only the count p(n) is shown — the number of partitions grows too fast to list.
- Use the examples panel to jump to common values and explore the sequence.
Use cases
- Check your combinatorics homework answer for partition numbers.
- Explore the partition function sequence p(0)–p(n) in number theory.
- Count the number of ways to break a number into additive parts for puzzles.
- Understand partitions in the context of Young tableaux and representation theory.
- Verify a specific partition listing for a small integer by hand.
- Teach integer partitions interactively in a discrete math course.
Frequently Asked Questions
Last updated: 2026-06-13 ·
Reviewed by Nham Vu