Integer Partition Visualizer

All ways to sum to n

CalculatorsFreeNo Signup
4.2(887 reviews)
All Tools

Loading tool...

About Integer Partition Visualizer

An integer partition visualizer listing all ways to write n = k₁+k₂+...+kₘ with k₁≥k₂≥...≥kₘ≥1. Shows the count p(n), Ferrers diagrams, conjugate partitions, and Euler's generating function. Client-side.

Integer Partition Visualizer Features

  • List all partitions
  • p(n) count
  • Ferrers diagrams
  • Conjugates
  • Generating function
Integer partitions of n: all distinct ways to write n as sum of positive integers (order doesn't matter). p(5)=7: 5=4+1=3+2=3+1+1=2+2+1=2+1+1+1=1+1+1+1+1. p(n) grows exponentially: p(100)=190,569,292,356. Hardy-Ramanujan formula: p(n) ~ exp(π√(2n/3))/(4n√3).

How to Use

Enter n:

  • Count: p(n) total
  • List: All partitions
  • Diagrams: Ferrers/Young

Ferrers Diagrams

Each partition maps to a dot diagram: row i has kᵢ dots. The conjugate partition is the transpose. Ferrers diagrams reveal symmetries and prove identities (e.g., # partitions into ≤k parts = # partitions with largest part ≤k).

Ramanujan

Ramanujan discovered remarkable congruences: p(5n+4)≡0 (mod 5), p(7n+5)≡0 (mod 7), p(11n+6)≡0 (mod 11). The Hardy-Ramanujan-Rademacher exact formula gives p(n) as a convergent series.

Step-by-Step Instructions

  1. 1Enter n.
  2. 2See count.
  3. 3View all partitions.
  4. 4Explore diagrams.
  5. 5Check conjugates.

Integer Partition Visualizer — Frequently Asked Questions

How fast does p(n) grow?+

Superexponentially! p(10)=42, p(50)=204,226, p(100)≈1.9×10^8, p(200)≈4×10^12. Hardy and Ramanujan showed p(n) ~ exp(π√(2n/3))/(4n√3). Rademacher refined this to an exact convergent series.

What's a conjugate partition?+

Transpose the Ferrers diagram (swap rows and columns). Example: 4+2+1 has diagram ●●●●/●●/●. Transpose: ●●●/●●/●/● = 3+2+1+1. Conjugation is an involution on partitions, proving many identities.

How are partitions different from compositions?+

Partitions ignore order (3+1=1+3 is one partition). Compositions care about order (3+1≠1+3 are different). There are 2^(n-1) compositions of n, but many fewer partitions. Partitions are much harder to count.

Share this tool: