Unsigned Lah Number

Count partitions of n labeled elements into k nonempty linearly ordered blocks using unsigned Lah numbers, including L(0,0)=1; indices are capped at 500.

Description

Unsigned Lah numbers count partitions of labeled elements into blocks whose elements are linearly ordered.

Unsigned Lah numbers count partitions of labeled elements into blocks whose elements are linearly ordered. The collection of blocks itself is unordered.1

The tool returns value. The indexing and output conventions below determine how to read these values.

When to use Unsigned Lah Number

Use this for the following task: Count partitions of n labeled elements into k nonempty linearly ordered blocks using unsigned Lah numbers, including L(0,0)=1; indices are capped at 500. Use the input and output conventions below to reproduce the intended mathematical quantity.

How to use Unsigned Lah 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, k 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
nLabeled element count (resource limit 500)integer; minimum 0; maximum 500Required
kOrdered block count (resource limit 500)integer; minimum 0; maximum 500Required

Handle the empty case as one and impossible block counts as zero. Compute the binomial factor and multiply integers from k+1 through n using BigInt.

L(n,k)=C(n−1,k−1)×n!/k! for 1≤k≤n

The symbols and boundary conditions refer to the supplied fields and the implementation described above.

Output fieldMeaningValue type
valueUnsigned Lah numberstring (integer/arbitrary)
json
{
  "input": {
    "n": 4,
    "k": 2
  },
  "output": {
    "value": "36"
  }
}

Limitations and assumptions

Both indexes are at most 500. Internal block order matters; this differs from Stirling set partitions with unordered elements in each block.

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 Stirling Number of the Second Kind when you need its operation: Count partitions of n labeled elements into k nonempty unlabeled blocks exactly, returning zero when k exceeds n; indices are capped at 300. Choose Composition Count into Positive Parts for the complementary 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.

Background reference: OEIS A105278.

References

  1. OEIS A105278 — OEIS Foundation

Similar or alternative tools

  • Stirling Number of the Second Kind

    Count partitions of n labeled elements into k nonempty unlabeled blocks exactly, returning zero when k exceeds n; indices are capped at 300.

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

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