Report Tool or Give Us Suggestions

Rewrite Integer as Sum

Decompose any positive integer into a sum of smaller integers. Generate all mathematical partitions or specify custom addend constraints.

L ading . . .

What Is an Integer Partition?

In number theory and combinatorics, an integer partition is a way of writing a positive integer $N$ as a sum of positive integers. For example, the number 4 can be partitioned in five distinct ways:
4 = 4
4 = 3 + 1
4 = 2 + 2
4 = 2 + 1 + 1
4 = 1 + 1 + 1 + 1

Symmetry and Constraints in Sum Decomposition

Our calculator allows you to apply strict constraints to your partitions, filtering the combinations to suit your specific mathematical needs:

  • Exact Number of Terms: Restricts the decomposition to contain exactly $k$ addends. For instance, decomposing 10 into exactly 3 terms.
  • Distinct Addends Only: Ensures that all terms in each sum are unique (no repeated numbers). E.g. 4 = 3 + 1 is valid, but 4 = 2 + 2 is excluded.
  • Parity Control (Odd/Even): Limit terms to contain only odd integers or only even integers.
  • Maximum Value Limits: Specify the maximum value any individual term can have.

Frequently Asked Questions

What is the order of terms in the output?

Partitions are standardly listed in non-increasing order (where terms are sorted from largest to smallest, e.g. 3 + 2 + 1). This prevents duplicate combinations with different permutations from appearing in the output.

Why is the input integer limited to 80?

The number of integer partitions grows extremely fast as the number increases (e.g. N=100 has over 190 million partitions!). To prevent browser lag or crashes, a safe local calculation ceiling is set.

Can I include zero in the sums?

Yes! By checking the "Allow Zero" box, the tool will include zero in the term lists (e.g., 5 = 3 + 2 + 0). To prevent infinite loops, only a single zero is allowed per partition.

logo OnlineMiniTools

OnlineMiniTools.com is your ultimate destination for a wide range of web-based tools, all available for free.

Feel free to reach out with any suggestions or improvements for any tool at admin@onlineminitools.com. We value your feedback and are continuously striving to enhance the tool's functionality.

© 2026 OnlineMiniTools . All rights reserved.

Hosted on Hostinger

v1.10.0