CalcWorldHub
Free online calculator · no signup

Integer partition number calculator

Count the ways to write a nonnegative integer as a sum of positive integers when changing the order does not make a new partition.

Integer partition number calculator — Target integer n (0–500) and calculation method
Integer partition number calculator: inputs and calculation method.

How to use this calculator

Count the ways to write a nonnegative integer as a sum of positive integers when changing the order does not make a new partition.

  1. Enter Target integer n (0–500). Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

How Integer partition number calculator works

Count the ways to write a nonnegative integer as a sum of positive integers when changing the order does not make a new partition.

Inputs and units

  • Target integer n (0–500): n is the integer being partitioned; zero is allowed and the supported range ends at 500.

Formula and method

p(0)=1. For n>0, p(n) counts unordered sums of positive integers; the dynamic program adds each part size once so permutations are not counted separately.

Worked example

For n=5 the partitions are 5, 4+1, 3+2, 3+1+1, 2+2+1, 2+1+1+1, and 1+1+1+1+1, so p(5)=7.

Interpreting the result

The output is a count of distinct unordered decompositions, not the number of ordered compositions. For n=20 it is 627.

Assumptions and limits

This calculator counts unrestricted partitions and does not constrain the number, size, or distinctness of parts. The exact count grows quickly; the tool limits n to 500.

Sources and method

Frequently asked questions

Does 2+3 differ from 3+2?

No. Partitions ignore the order of addends.

Why is p(0)=1?

There is one empty partition, which makes the recurrence work at its boundary.

How do I use the Integer partition number calculator?

Enter Target integer n (0–500). Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Integer partition number?

For n=5 the partitions are 5, 4+1, 3+2, 3+1+1, 2+2+1, 2+1+1+1, and 1+1+1+1+1, so p(5)=7.

What does the Integer partition number calculator calculate?

Count the ways to write a nonnegative integer as a sum of positive integers when changing the order does not make a new partition.

Related calculators