← Mathématiques et statistiques

Catalan numbers explorer

Explorateur des nombres de Catalan

Calculez Cn et visualisez rapidement les structures associées, avec explications et exemples.

All calculations run in your browser. Tree output uses '*' to mark leaves.

Autres langues ja | en | zh-CN | es | pt-BR | id | fr | hi-IN | ar

Comment l'utiliser (3 étapes)

  1. Choose n and a representation tab (parentheses, path, or tree).
  2. Pick enumerate or sample, then set limits and seed as needed.
  3. Review C_n, examples, and the full table, then export CSV or share the URL.

Inputs

Quick n
Representation
Example view
Mode

Result

C_n value

C_n = (1 / (n + 1)) * C(2n, n)
C_0 = 1, C_{n+1} = sum_{i=0..n} C_i * C_{n-i}

How to read the examples

Parentheses use '(' and ')'. Paths use U for up, R for right. Trees use (L,R) with '*' as a leaf.

Enumeration is automatically disabled for large n. Sampling uses a uniform DP method with a fixed seed.

Examples

    Table (C_0 to C_nMax)

    n C_n digits

    Example walkthroughs

    n = 3 (5 strings)

    Balanced parentheses of length 6: ((())), (()()), (())(), ()(()), ()()().

    n = 10 (C_10 = 16796)

    Use sampling to browse examples and export a CSV if you need test data.

    FAQ

    Qu’est-ce qu’un nombre de Catalan ?

    Catalan numbers count balanced parentheses, Dyck paths, full binary trees, and many other structures that share the same recurrence.

    Pourquoi l’énumération est-elle plafonnée ?

    The number of examples grows very quickly. Sampling keeps the page responsive while still giving representative outputs.

    L’échantillonnage est-il uniforme ?

    Yes. The sampler uses DP counts to choose each step so every Dyck word is equally likely. A fixed seed reproduces the same list.

    Comment les chemins de Dyck se traduisent-ils en parenthèses ?

    Map '(' to U and ')' to R. The path stays under the diagonal exactly when the parentheses string is balanced.

    Quel est le lien avec la triangulation de polygone ?

    The number of triangulations of a convex (n+2)-gon is also C_n, so polygon triangulation is another Catalan structure.

    Quelle définition d’arbre est utilisée ?

    This page uses full binary trees with n internal nodes. Leaves are shown as '*', and internal nodes are written as (L,R).

    Calculatrices associées