How to use (3 steps)
- Choose Partition or Composition, then select the constraint you need.
- Enter n (and k/m/a/b when required), then pick count, table, enumeration, or sample.
- Export CSV/TSV or copy a shareable URL for your lesson or notes.
Inputs
Table
Examples
Key formulas and notes
- Partition counts use dynamic programming: p(n, m) = p(n, m-1) + p(n-m, m).
- Compositions count is 2^(n-1) for n >= 1, and k parts use C(n-1, k-1).
- Distinct parts and odd parts have the same count (Euler's identity).
- Enumeration is limited for speed; use samples for larger n.
How to use this calculator effectively
This guide helps you use Integer partition calculator (p(n), constrained partitions) in a repeatable way: set a baseline, change one variable at a time, and interpret the output with clear assumptions before sharing or exporting results.
How it works
The calculator takes your input values, applies a deterministic formula set, and returns output using display rounding only at the final step. This means the tool is best used as a comparison engine: keep one scenario as a reference, then test alternate assumptions so you can quantify how sensitive the final answer is to each input.
When to use
Use this page when you need a fast planning estimate, a classroom sanity check, or a shareable scenario that another person can reproduce from the same parameters. It is especially useful before deeper modeling, because it exposes direction and magnitude quickly without requiring sign-in or setup friction.
Common mistakes to avoid
- Mixing units (for example, percent vs decimal, or monthly vs yearly assumptions).
- Changing multiple fields at once, which makes it hard to explain why results shifted.
- Comparing outputs from different tools without aligning defaults and conventions.
- Reading rounded display numbers as exact values in downstream calculations.
Interpretation and worked example
Run a baseline case first and keep a copy of that output. Next, change one assumption to represent your realistic alternative, then compare the delta in both absolute and percentage terms. If the direction matches your domain intuition and the size of change is plausible, your setup is likely coherent. If not, review units, sign conventions, and hidden defaults before drawing conclusions.
See also
How to use this calculator effectively
This calculator is designed to make scenario checks fast. Use a repeatable workflow: baseline first, one variable change at a time, then compare output direction and magnitude.
How it works
Run your first scenario with defaults. Then, change exactly one assumption and observe which result changes most. That is the fastest way to identify sensitivity and explain what drives the outcome.
When to use
Use this page when you need practical planning support, side-by-side alternatives, or a clean baseline for further discussion.
Common mistakes to avoid
- Changing multiple assumptions simultaneously.
- Confusing percent and decimal inputs.
- Mixing unit systems across scenarios.
- Relying only on rounded display output for final conclusions.
Worked example
Prepare a base case and one alternative case, then compare outputs and validate the direction, scale, and interpretation with the same assumptions across both cases.
See also
FAQ
What is the difference between partitions and compositions?
Partitions ignore order (3+1 equals 1+3), while compositions treat different orders as distinct.
What does p(n) mean?
p(n) is the number of integer partitions of n, also called the partition number.
How do I count partitions into exactly k parts?
Select p(n, k) and enter k to count partitions with exactly k parts.
How do distinct partitions work?
Distinct partitions require every part size to be unique. The count equals the odd-part count.
What is a Ferrers (Young) diagram?
It draws each part as a row of dots or squares, making the partition shape visible.
Why is composition count 2^(n-1)?
There are n-1 gaps between ones, and each gap either has a divider or not.
Why is enumeration limited for large n?
The number of partitions grows quickly, so enumeration is capped to keep the page fast.
Can I compute values modulo m?
Yes. Switch to modulo mode and enter m to compute results mod m.