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

  1. Choose the required indexes, integers or sequence entries. Preserve decimal-string encodings where the field table specifies strings.
  2. Enter n according to the field table, then run the tool.
  3. Read value. Preserve exact decimal strings and the stated indexing or coefficient order.
  4. Keep exact decimal strings for subsequent integer arithmetic; distinguish them from any explicitly approximate numeric result.
Input fieldMeaningValue type and boundsRequirement
nNonnegative total (resource limit 1000)integer; minimum 0; maximum 1000Required

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 fieldMeaningValue type
valueInteger partition countstring (integer/arbitrary)
json
{
  "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

  1. 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.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies