Partition Of An Integer Calculator
Work out partition of an integer instantly with clear inputs, formula shown and shareable results.
About Partition Of An Integer Calculator
A partition writes n as an unordered sum of positive integers. The count p(n) is computed by dynamic programming over allowed part sizes, and restricting the largest part or requiring distinct parts gives smaller counts.
Formula
Partition recurrence
build p by iterating allowed parts and accumulating p[v] += p[v − part]
Worked example
With the default values below, Partition Of An Integer Calculator returns Number of partitions p(n) of 42. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Integer to partitionaccepts 0–200
- 10
- Restrict parts to at mostaccepts 1–200
- 4
Results
- Number of partitions p(n)
- 42
- Partitions with parts at most your limit
- 23
- Partitions into distinct parts
- 10
- Integer partitioned
- 10
Step by step
- 1Values used
- 2Partition recurrence
- 3Number of partitions p(n)= 42
- 4Partitions with parts at most your limit= 23
- 5Partitions into distinct parts= 10
- 6Integer partitioned= 10
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
How many partitions does 10 have?
42, of which 10 use parts no larger than 4 and 10 use distinct parts.
Is there a closed formula?
No simple one. Hardy and Ramanujan gave an asymptotic p(n) ~ exp(π√(2n/3))/(4n√3), later made exact by Rademacher's series.
Related Calculators
You might also need
- Discrete Logarithm CalculatorAlso in Discrete Math, Logic & Number Theory
- Adjacency Matrix CalculatorAlso in Discrete Math, Logic & Number Theory
- Base 64 Value CalculatorAlso in Discrete Math, Logic & Number Theory
- Bell Number CalculatorAlso in Discrete Math, Logic & Number Theory
- Binary To Decimal CalculatorAlso in Discrete Math, Logic & Number Theory
- Binary To Hexadecimal CalculatorAlso in Discrete Math, Logic & Number Theory
