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

  1. Enter a non-negative integer n in the input field.
  2. The calculator computes p(n) using Euler's recurrence relation in O(n√n) time.
  3. For n ≤ 20, every distinct partition is listed (e.g. 4 = 3+1 = 2+2 = 2+1+1 = 1+1+1+1).
  4. Above n = 20, only the count p(n) is shown — the number of partitions grows too fast to list.
  5. 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