Integer Partition Calculator

Count partitions fast with practical mathematical constraints. Review lists, totals, and examples in one workspace. Study every restriction clearly with export-ready results shown below.

Calculator Inputs

Example Data Table

Case Settings Matching Partitions
Unrestricted n = 6 11
Distinct parts n = 7, distinct only 5
Odd parts n = 8, odd only 6
Exact part count n = 9, exactly 3 parts 7
Bounded with required part n = 10, max part 5, include 4 10

Formula Used

The unrestricted partition count is based on the classical recurrence p(n, k) = p(n, k - 1) + p(n - k, k), where p(0, k) = 1 and p(n, 0) = 0 for positive n.

The total partition number is p(n) = p(n, n). Distinct-part cases follow the product ∏(1 + x^m), while odd-part cases follow ∏1/(1 - x^(2m-1)).

This calculator extends the recurrence by tracking the remaining sum, current largest allowed part, number of parts already used, and whether a required part value has appeared.

How to Use This Calculator

  1. Enter the target integer you want to partition.
  2. Set optional lower and upper bounds for allowed part values.
  3. Choose part-count limits, or enter an exact number of parts.
  4. Enable distinct parts or odd parts if the problem requires them.
  5. Add a required part value when a specific number must appear.
  6. Select whether you want only the count or a generated list.
  7. Press Submit to display the result above the form.
  8. Use the CSV or PDF buttons to export the visible result.

Frequently Asked Questions

1. What is an integer partition?

An integer partition writes a positive integer as a sum of positive integers, ignoring order. For example, 4 = 3 + 1 and 4 = 1 + 3 represent the same partition.

2. What does distinct parts mean?

Distinct parts means no value can repeat inside one partition. So 6 = 3 + 2 + 1 is allowed, while 6 = 3 + 3 is excluded.

3. What happens when I choose odd parts only?

The calculator only uses odd summands such as 1, 3, 5, and 7. This lets you test Euler-style partition identities or solve restricted counting questions quickly.

4. Does exact number of parts override min and max parts?

Yes. When an exact part count is entered, the calculator ignores the separate minimum and maximum part-count fields and enforces only the exact total number of parts.

5. Why might the listed partitions be fewer than the total count?

The total count can be very large. To keep the page responsive, the calculator lists only up to your chosen display limit, while still reporting the full matching count.

6. Is order important in the generated partitions?

No. Each partition is displayed in nonincreasing order so equivalent sums are not repeated. This ensures 5 + 2 and 2 + 5 are treated as the same object.

7. Can this help with proofs or theory homework?

Yes. You can test conjectures, compare restricted counts, inspect sample partitions, and study recurrence behavior before writing a formal proof or classroom solution.

8. When should I use count only mode?

Use count only mode when n is larger or your restrictions still produce many valid partitions. It avoids building long lists and returns the answer faster.

Related Calculators

probability combination calculatorbinomial coefficient calculatorpermutation with repetition calculatordouble factorial calculatoranagram calculatorstirling number calculatorpartition number calculatorsubset sum calculatorpermutation formula calculatorballs and urns calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.