Catalan Number Sequence Generator
Generate Catalan number sequences up to C(500). Compute exact values using BigInt arithmetic with the recursive product formula. Copy, explore, and learn.
About
Catalan numbers form a sequence of natural integers that appear across discrete mathematics: counting valid parenthesizations, binary tree structures, polygon triangulations, lattice paths below the diagonal, and non-crossing partition counts. The n-th Catalan number Cn grows asymptotically as 4nn3/2 โฯ, which means manual computation becomes impractical past C20. Incorrect sequence values propagate errors in algorithm analysis, dynamic programming table sizing, and combinatorial proof verification. This generator computes exact arbitrary-precision Catalan numbers using BigInt arithmetic through the iterative recurrence Cn = Cnโ1 ร 2(2n โ 1) รท (n + 1), avoiding factorial overflow entirely.
The tool supports indices from 0 to 500. Note: C500 has 299 decimal digits. Results are exact, not floating-point approximations. For research use, be aware that OEIS designates this as sequence A000108.
Formulas
The n-th Catalan number is defined by the closed-form binomial expression:
This tool avoids computing large factorials directly. Instead, it uses the iterative recurrence relation which is numerically stable with integer arithmetic:
The asymptotic growth approximation for large n is given by:
The generating function for the sequence satisfies the quadratic equation:
Where Cn = the n-th Catalan number (dimensionless integer), n = non-negative index (n โ N0), and n! = factorial of n.
Reference Data
| n | Cn | Digit Count | Combinatorial Interpretation |
|---|---|---|---|
| 0 | 1 | 1 | Empty structure (base case) |
| 1 | 1 | 1 | Single valid pair of parentheses: () |
| 2 | 2 | 1 | Binary trees with 2 nodes |
| 3 | 5 | 1 | Triangulations of a pentagon |
| 4 | 14 | 2 | Non-crossing partitions of {1,2,3,4} |
| 5 | 42 | 2 | Dyck paths of length 10 |
| 6 | 132 | 3 | Full binary trees with 7 leaves |
| 7 | 429 | 3 | Stack-sortable permutations of length 7 |
| 8 | 1,430 | 4 | Monotone lattice paths in 8ร8 grid |
| 9 | 4,862 | 4 | Ways to connect 2ร9 points on circle without crossings |
| 10 | 16,796 | 5 | Valid sequences of 10 pairs of parentheses |
| 15 | 9,694,845 | 7 | Polygon triangulations of 17-gon |
| 20 | 6,564,120,420 | 10 | Exceeds 32-bit integer range |
| 25 | 4,861,946,401,452 | 13 | Ballot problem configurations |
| 30 | 5,909,761,445,129,385,600 | 19 | Exceeds 64-bit float precision |
| 50 | 1.978 ร 1028 | 29 | RNA secondary structure folds |
| 100 | 8.969 ร 1058 | 59 | Planar graph enumeration |
| 200 | 2.232 ร 10118 | 119 | Requires arbitrary-precision arithmetic |
| 500 | 5.395 ร 10298 | 299 | Maximum index supported by this tool |