Catalan Triangle Entry

Return the ballot-number Catalan triangle entry T(n,k)=C(n+k,k)−C(n+k,k−1), with zero outside 0≤k≤n and indices capped at 500.

Description

The ballot-number Catalan triangle records restricted path counts by row and column.

The ballot-number Catalan triangle records restricted path counts by row and column. Its diagonal contains the ordinary Catalan numbers under this indexing.1

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

When to use Catalan Triangle Entry

Use this for the following task: Return the ballot-number Catalan triangle entry T(n,k)=C(n+k,k)−C(n+k,k−1), with zero outside 0≤k≤n and indices capped at 500. Use the input and output conventions below to reproduce the intended mathematical quantity.

How to use Catalan Triangle Entry 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
nZero-indexed row (resource limit 500)integer; minimum 0; maximum 500Required
kZero-indexed column (resource limit 500)integer; minimum 0; maximum 500Required

Return zero above the triangular range. Use exact BigInt binomial coefficients, interpreting a negative lower index as zero.

T(n,k)=C(n+k,k)−C(n+k,k−1) for 0≤k≤n

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

Output fieldMeaningValue type
valueCatalan triangle ballot numberstring (integer/arbitrary)
json
{
  "input": {
    "n": 3,
    "k": 2
  },
  "output": {
    "value": "5"
  }
}

Limitations and assumptions

Rows and columns are zero-based and capped at 500. Other triangles called Catalan triangles can use different indexing or entries.

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 Fuss–Catalan Number when you need its operation: Return the exact p-ary tree Fuss–Catalan number C(pn,n)/((p−1)n+1), with p≥2 and pn≤5,000 as a computation resource limit. Choose Pascal Triangle Row for the complementary operation: Return the zero-indexed nth row of Pascal’s triangle as exact decimal binomial coefficients; n is capped at 1,000 to bound the output.

Background reference: OEIS A009766.

References

  1. OEIS A009766 — OEIS Foundation

Similar or alternative tools

  • Fuss–Catalan Number

    Return the exact p-ary tree Fuss–Catalan number C(pn,n)/((p−1)n+1), with p≥2 and pn≤5,000 as a computation resource limit.

  • Pascal Triangle Row

    Return the zero-indexed nth row of Pascal’s triangle as exact decimal binomial coefficients; n is capped at 1,000 to bound the output.

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