2026-09-29 8 min

Partition Number Calculator

Compute p(n) integer partitions by exact coin-change DP with Ferrers diagrams and growth notes.

Calculator

Partition Number Inputs

Index (n)
Results update live as you type
Status:p(10) = 42exact integer

Partition Summary

p(n)42
Run1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42
Growth×1.4 over p(9)

Results

Optimal

p(n)

42

Integer partitions of n

p(n−1)

30

Previous partition number

Growth p(n)/p(n−1)

1.4×

Step multiplier

Exactness

Exact (n ≤ 80)

Double integer range

Hardy–Ramanujan est.

48.10430882

Asymptotic approximation

p(n) by exact coin-change DP; Ferrers shapes and Hardy–Ramanujan scale included with honest exactness labels.

Visualizations

Partition run

1p0
1p1
2p2
3p3
5p4
7p5
11p6
15p7
22p8
30p9
42p10

Partition growth

Index progress to cap

n / 10010

p(n) vs p(n−1)

p(n)42

Formula

Coin-change DP counts partitions by allowing each part size in turn; order never matters.

dp[0]=1; for k=1..n: dp[j] += dp[j−k] — answer p(n)=dp[n]

Alternative Form

Euler pentagonal: p(n) = Σ (−1)^{k+1} p(n−g_k) · H–R: e^{π√(2n/3)}/(4n√3)

Variables

SymbolNameUnitDescription
nIndexcountInteger partitioned 0–100
p(n)ResultpartitionsOrder-ignored additive splits
dpTablearrayRunning counts per subtotal
H–REstimateapproxHardy–Ramanujan asymptotic

Explanation

Bars trace the partition explosion; Ferrers dots show what one partition looks like.

Derivation

Each part size k extends all subtotals j ≥ k (classic unbounded-knapsack counting). Euler’s pentagonal theorem gives the signed recurrence; Hardy–Ramanujan–Rademacher refines it asymptotically.

Step-by-Step Calculation

Follow each step to understand how the result is calculated from your inputs.

Step 1

Read the index.

Input: n (0..100)
n:10
Result: n = 10
Step 2

Seed the DP table.

dp[0] = 1 (empty partition)
Intermediate: one way to make 0
Result: Base ready
Step 3

For each part size k, accumulate new totals.

dp[j] += dp[j−k] for j ≥ k
Intermediate: run: 1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42
Result: table complete to 10
Step 4

Read p(n) off the table.

p(n) = dp[n]
Intermediate: p(9) = 30
Result: p(10) = 42
Step 5

Measure growth against the previous value.

ratio = p(n)/p(n−1)
Intermediate: ×1.4
Result: Growth ×1.4
Step 6

Compare with Hardy–Ramanujan and certify.

p(n) ~ e^{π√(2n/3)}/(4n√3)
Intermediate: est ≈ 48.10430882
Result: Exact: p(10) = 42
Final Answer
42

Worked Examples

See how the calculator works with different scenarios.

Scenario

Hand-listable.

Inputs

n:4

Calculation

4, 3+1, 2+2, 2+1+1, 1+1+1+1

Result

p(4) = 5

Interpretation

Five additive splits.

Understanding Your Result

Your Result: p(n) — exact partition count with DP evidence (see result cards).

Typical range: 1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, … then 204K at 50, 190M at 100.

What This Means

Every way to add positive integers to n, order ignored.

Why It Matters

Partitions link combinatorics, modular forms, statistical mechanics, and representation theory.

Professional Interpretation

DP values to 80 are exact; past that the label switches to rounded with H–R backup.

Recommendations

  • •Quote the DP run
  • •Compare with H–R estimate
  • •Trust exactness to 80
  • •Separate p(n) from Bell
  • •Cap exploratory n at 100

Educational Content

Introduction

How many ways can 10 break into pieces? Partition numbers count every additive split.

Concept Explanation

Layer each part size over the running table — combinations accumulate without permutations.

Applications

▸Coin-change counting
▸Statistical mechanics states
▸Representation theory
▸Modular-form coefficients
▸Ramanujan congruences
▸Algorithm-analysis recurrences

Benefits

  • •Exact DP to 80
  • •Ferrers visual included
  • •Growth estimated
  • •Run of values shown
  • •Pentagonal context noted

Limitations

  • •n ≤ 100 cap
  • •Rounded past 80
  • •Counts only (no listing)

Best Practices

  • •Seed dp[0]=1
  • •Layer parts outer-loop
  • •Read p(n) at dp[n]
  • •Check H–R scale
  • •List small n by hand first

Common Misconceptions

Myth: Order matters in partitions.
Truth: 3+1 and 1+3 are the same partition — compositions count order, partitions do not.
Myth: p(n) = Bell B(n).
Truth: p(5)=7 sizes vs B(5)=52 labeled groupings — different universes.
Myth: DP is approximate.
Truth: Integer additions are exact; only double display rounds past 80.
Myth: Growth is exponential.
Truth: Sub-exponential e^{c√n} — furious yet slower than cⁿ.

Practical Tips

  • •Seed dp[0] = 1
  • •Loop parts outer, totals inner
  • •Read p(n) at dp[n]
  • •Order never matters
  • •Memorize 1,2,3,5,7,11,15,22
  • •Check H–R scale for big n
  • •Cap n at 100 here

Common Mistakes

Swapping loop order (counting compositions)
Parts must be the outer loop — totals inner counts combinations.
Forgetting dp[0]=1
The empty base seeds every extension.
Counting 3+1 and 1+3 separately
That is compositions (2^{n−1}); partitions identify them.
Using p(n) for labeled grouping
Labeled layouts need Bell, not p(n).
Claiming exactness at n = 100
Label rounded past 80; H–R backs the scale.

Assumptions

This calculator makes the following assumptions to provide estimates:

Order ignored: Standard partition definition.
Whole index: n integer 0–100.
Unlimited parts: Any part size 1..n allowed.
DP integer math: Exact additions; display may round.
Local only: No server calls.

Limitations

Be aware of these limitations when using this calculator:

Exactness ceiling: n > 80 results are correctly rounded doubles.
Index cap: n ≤ 100 keeps DP instant.
Counts, not lists: No enumeration of partitions.
Unrestricted only: Distinct/odd-part variants need filters.

Frequently Asked Questions

Answers to common questions about this calculator.

What is a partition number?
p(n) counts ways to write n as a sum of positive integers ignoring order: p(4)=5 (4, 3+1, 2+2, 2+1+1, 1+1+1+1).
What is p(10)?
42 — the same digits as C(5), coincidentally.
How is p(n) computed here?
Classic coin-change DP: for each part k, add dp[j−k] — O(n²) time, O(n) space, exact to n=80.
What is Euler’s pentagonal recurrence?
p(n) = Σ (−1)^{k+1} p(n − g_k) over generalized pentagonal g_k — the faster exact alternative.
How fast does p(n) grow?
Hardy–Ramanujan: p(n) ~ e^{π√(2n/3)}/(4n√3) — sub-exponential but furious (p(100) ≈ 190M, p(200) ≈ 4×10⁹).
Partitions vs Bell numbers?
p(n) splits the integer n by sizes; Bell splits n labeled items by membership — p(5)=7 vs B(5)=52.
What is p(0)?
1 — the empty partition, anchoring every recurrence.
Why the n ≤ 100 cap?
DP stays instant and exact-labeled; p(100) ≈ 190,569,292 already needs care past n=80.
Ramanujan congruences?
p(5k+4) ≡ 0 mod 5, p(7k+5) ≡ 0 mod 7, p(11k+6) ≡ 0 mod 11 — famous divisibility patterns.

Related Calculators

Explore more calculators related to this topic.

Related Guides

Deepen your understanding with these educational resources.

Glossary

Technical terms used in mortgage calculations explained in plain language.

Partition p(n)
Order-ignored additive splits of n.
Coin-change DP
Layered counting table for partitions.
Ferrers diagram
Dot rows picturing one partition.
Conjugation
Row/column flip bijection on diagrams.
Pentagonal recurrence
Euler signed recurrence via g_k.
Hardy–Ramanujan
e^{π√(2n/3)}/(4n√3) asymptotic.
Composition
Order-matters split (2^{n−1} of them).
Ramanujan congruence
Mod-5/7/11 partition divisibilities.

Authoritative References

Trusted sources and standards referenced by this calculator.

Applicable Standards

Common Core HSS-CP — counting and DP reasoningNCTM Discrete Mathematics — recursion and generating functions

Was This Calculator Helpful?

Page Information

Last Updated:

2026-09-29

Version:

2.0.0

License:

Free to use for educational and professional purposes.