Catalan Number Calculator
Calculate Catalan numbers and explore their many combinatorial applications.
Calculate C_n
C_5
42
= (2Ć5)! / ((5+1)! Ć 5!) = 10! / (6! Ć 5!)
Catalan Sequence
Combinatorial Interpretations of C_5 = 42
Balanced Parentheses
42 ways to arrange 5 pairs
Binary Trees
42 different full binary trees with 6 leaves
Triangulations
42 ways to triangulate a polygon with 7 sides
Dyck Paths
42 paths from (0,0) to (25,0)
Mountain Ranges
42 mountain ranges with 5 upstrokes
Formulas
Direct Formula
C_n = (2n)! / ((n+1)! Ć n!)
Binomial Form
C_n = C(2n,n) / (n+1)
Recurrence
C_n = Σ C_i à C_(n-1-i)
Asymptotic
C_n ~ 4^n / (n^(3/2) Ć āĻ)
What Are Catalan Numbers?
Catalan numbers (C_n) form a sequence that counts an astonishing variety of combinatorial structures: valid parentheses expressions, binary trees, triangulations of polygons, Dyck paths, and more. The nth Catalan number is C_n = (2n)!/((n+1)!n!) = C(2n,n)/(n+1). The sequence begins 1, 1, 2, 5, 14, 42, 132, 429... This calculator uses BigInt arithmetic for exact computation of large Catalan numbers.
Catalan numbers appear in over 200 combinatorial counting problems ā more than any other sequence except perhaps the Fibonacci numbers and binomial coefficients. Their ubiquity makes them a favorite topic in discrete mathematics and computer science algorithms courses.
Catalan Number Formula
Catalan Number
Where:
- n= The index ā a non-negative integer. Cā = 1, Cā = 1, Cā = 2, Cā = 5...
How to Use
- Enter n: The index of the Catalan number you want.
- Set sequence length: Control how many Catalan numbers are displayed in the sequence view.
- Read C_n: The nth Catalan number is displayed using BigInt for exact integer results.
Applications
Catalan numbers count valid parentheses: with n pairs of parentheses, there are C_n ways to arrange them properly. In binary trees, C_n counts the number of structurally different binary trees with n nodes. In computational geometry, C_n counts triangulations of an (n+2)-gon. In algorithm analysis, the number of ways to multiply n+1 matrices in a chain (parenthesization problem) is C_n. In ballot problems, C_n provides the number of ways n+1 votes for A and n votes for B can be counted with A never behind.
Worked Examples
Catalan for n=3
Problem:
Count the Catalan structures for n=3.
Solution Steps:
- 1Cā = 6!/4!3! = 720/(24Ć6) = 720/144 = 5.
- 25 valid parentheses: ()()(), (())(), ()(()), (()()), ((())).
- 35 binary trees with 3 nodes.
Result:
Cā = 5. Five ways to parenthesize 4 matrices: ((AB)C)D, (A(BC))D, (AB)(CD), A((BC)D), A(B(CD)).
Tips & Best Practices
- āC_n = C(2n,n) ā C(2n,n+1) ā an alternative formula using binomial coefficients.
- āCatalan numbers grow roughly like 4^n / (n^(3/2) āĻ) ā faster than exponential but slower than factorial.
- āFor n=0, Cā=1 (the empty structure counts as one).
- āThe Catalan recurrence: C_{n+1} = Ī£_{i=0}^{n} C_i Ć C_{nāi} produces the same sequence.
Frequently Asked Questions
Sources & References
- Catalan Numbers - Wikipedia (2024)
- Catalan Numbers - OEIS A000108 (2024)
- Catalan Numbers - Brilliant (2024)
Last updated: 2026-06-06
Help us improve!
How would you rate the Catalan Number Calculator?
Editorial Note
MyCalcBuddy Editorial Team
This page is maintained as an educational calculator reference.
Formula Source: Handbook of Mathematical Functions
by Abramowitz & Stegun