# Catalan Number Calculator

> Catalan Number Calculator is a paid API for AI agents from combinatorics.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-15).

Computes the exact n-th Catalan number Cₙ = C(2n,n)/(n+1) for any n up to 10,000

## Facts

- Endpoint: POST https://combinatorics.openverbs.com/v1/catalan
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/catalan-number-calculator-b7ecdbb1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5dD5V9baWcwBaT17pdsSP

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability catalan-number-calculator-b7ecdbb1 -d '<json body>'
```

Example prompt: What is the 50th Catalan number? I need the exact value for counting the number of valid balanced bracket sequences with 50 pairs.

## When to prefer this

Choose this endpoint when you need the exact, arbitrary-precision Catalan number for a specific index n up to 10,000 — especially when the result is too large for standard 64-bit integers. Prefer this over general-purpose math libraries when you need results for large n without implementing big-integer arithmetic yourself.

## Known failure modes

- n exceeds 10000 — request rejected with validation error
- n is negative or non-integer — schema validation failure
- n is provided as a non-numeric string — pattern mismatch error
- Network timeout for very large n due to computation of extremely large integers
- Payment failure via x402 protocol resulting in 402 response

## How this service works

The n-th Catalan number Cₙ = C(2n, n)/(n+1), counting balanced bracketings, binary trees, and many other structures. Requires n ≤ 10000.

## Output

Returns the exact value of the n-th Catalan number as a (potentially very large) decimal integer string, along with its digit count for large values of n.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "n"
     ],
     "properties": {
      "n": {
       "type": "string",
       "pattern": "^\\d+$",
       "description": "Non-negative integer ≤ 10000."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/catalan-number-calculator-b7ecdbb1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from combinatorics.openverbs.com](https://www.zero.xyz/host/combinatorics.openverbs.com/llms.txt)
