Integer Partition Number
Count unordered partitions of n into positive integer parts exactly, including the empty partition of zero; n is capped at 1,000 for bounded computation.
Description
An integer partition expresses a total as an unordered sum of positive integers.
An integer partition expresses a total as an unordered sum of positive integers. Reordering the same parts does not produce another partition.1
The tool returns value. The indexing and output conventions below determine how to read these values.
When to use Integer Partition Number
Use this for the following task: Count unordered partitions of n into positive integer parts exactly, including the empty partition of zero; n is capped at 1,000 for bounded computation. Use the input and output conventions below to reproduce the intended mathematical quantity.
How to use Integer Partition Number and understand its results
- Choose the required indexes, integers or sequence entries. Preserve decimal-string encodings where the field table specifies strings.
- Enter n according to the field table, then run the tool.
- Read value. Preserve exact decimal strings and the stated indexing or coefficient order.
- Keep exact decimal strings for subsequent integer arithmetic; distinguish them from any explicitly approximate numeric result.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| n | Nonnegative total (resource limit 1000) | integer; minimum 0; maximum 1000 | Required |
Use a BigInt dynamic-programming array initialized with one empty partition. For each allowed part size, update totals upward to permit repetitions.
p(n) = coefficient of q^n in Π[k≥1](1−q^k)⁻¹ The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| value | Integer partition count | string (integer/arbitrary) |
{
"input": {
"n": 20
},
"output": {
"value": "627"
}
} Limitations and assumptions
The total is at most 1000. Zero returns one; no partition lists, restricted part sizes or ordered compositions are returned.
Use the declared integer bounds and string formats. Large exact outputs remain decimal strings; numerical approximations use ordinary floating-point arithmetic. A rejected input is different from a valid zero count or false membership flag.
Alternative or Complementary methods
Choose Composition Count into Positive Parts when you need its operation: Count ordered compositions of n into exactly k positive parts, with one empty composition of zero and zero for impossible counts; indices are capped at 2,000. Choose Partitions into kth Powers for the complementary operation: Count unordered partitions of a nonnegative total into positive kth powers with repetition, using exact counts, any positive safe-integer exponent, and a total limit of 2,000.
Background reference: Digital Library of Mathematical Functions, §26.9.
References
-
Digital Library of Mathematical Functions, §26.9 — National Institute of Standards and Technology
Similar or alternative tools
- Composition Count into Positive Parts
Count ordered compositions of n into exactly k positive parts, with one empty composition of zero and zero for impossible counts; indices are capped at 2,000.
- Partitions into kth Powers
Count unordered partitions of a nonnegative total into positive kth powers with repetition, using exact counts, any positive safe-integer exponent, and a total limit of 2,000.