About catalan numbers
The sequence reached print in Europe in 1751, when Leonhard Euler asked how many ways a convex polygon can be cut into triangles by non-crossing diagonals and worked out both the counts and a formula. The name attached to it much later and for an entirely different reason. Eugène Charles Catalan, a Belgian-born mathematician who spent most of his career in France and Liège, found the connection to parenthesised expressions while working on the Towers of Hanoi puzzle. It was the twentieth-century American combinatorialist John Riordan who began calling the numbers Catalan's, and the label stuck.
The dates run further back than Euler, though this only became widely known in 1988. The Mongolian mathematician Mingantu, working in Qing China, had begun writing Ge Yuan Mi Lu Jie Fa — "the quick method for obtaining the precise ratio of division of a circle" — by about 1730, prompted in part by three infinite series that the Jesuit missionary Pierre Jartoux had brought to China early in the century. Mingantu used the sequence as coefficients in series expansions, writing sin 2α and sin 4α in terms of sin α. His student Chen Jixin completed the manuscript in 1774, and it waited roughly another sixty years to be published. Peter Larcombe surveyed this history in 1999.
What makes the sequence remarkable is less its discovery than how often it is rediscovered. Désiré André's reflection argument of 1887 gave a clean way to count Dyck words, and the catalogue of things the numbers count has kept growing: Richard Stanley's Enumerative Combinatorics sets out sixty-six different interpretations as exercises. The pattern is consistent enough that finding a counting problem whose answers are 1, 1, 2, 5, 14, 42 is now taken as a strong hint that a bijection to brackets or trees is waiting to be found.
Key properties
- C(0) = C(1) = 1, and C(n) = C(2n, n) / (n + 1) = (2n)! / (n! · (n+1)!).
- Equivalently C(n) = C(2n, n) − C(2n, n+1), a difference of two binomial coefficients.
- The sequence convolves with itself: C(n+1) = C(0)·C(n) + C(1)·C(n−1) + … + C(n)·C(0).
- C(n+1) = C(n) · 2(2n + 1) / (n + 2), and the result is always a whole number, which is what lets each term be computed from its predecessor in exact integer arithmetic.
- C(n) is odd exactly when n = 2^k − 1; every other Catalan number is even.
- The only prime Catalan numbers are C(2) = 2 and C(3) = 5.
- The ratio C(n+1)/C(n) approaches 4, since C(n) grows like 4ⁿ / (n^(3/2)·√π).
- The n×n Hankel matrix whose (i, j) entry is C(i+j−2) has determinant 1 for every n.
Where they turn up
- Parsing and expression evaluation: C(n) is the number of ways to parenthesise a chain of n + 1 factors, so it is the size of the search space that matrix-chain multiplication and similar dynamic-programming problems have to avoid enumerating.
- Data structures: C(n) counts the distinct shapes of a binary tree with n internal nodes, which is the figure behind average-case analyses of unbalanced binary search trees and of random tree generation.
- Computational geometry: the triangulations of a convex polygon — Euler’s original question — are counted by C(n), and the same numbers bound the fan-triangulation choices in mesh generation.
- Molecular biology: non-crossing chord diagrams on 2n points, counted by C(n), are the standard model for pseudoknot-free RNA secondary structures.
- Elections and queues: Bertrand’s ballot problem, where one candidate must stay ahead throughout the count, is the Catalan numbers in another costume, and the same bound governs stack-sortable sequences.
- Trigonometric series: Mingantu used the sequence as expansion coefficients for sine functions in the 1730s, decades before the combinatorial readings were written down.
How to use this generator
The generated values appear at the top, with a copy button beside them. To turn them into an image, pick a look from the style presets under Make an image, choose an export size, and download as PNG, JPEG or WebP. Everything is rendered in your browser, so nothing you generate is sent to a server.
The address bar updates as you work, so the link always reproduces exactly what you see — handy for sharing a specific sequence or saving a configuration for later. Use Copy to take the values as plain text, or Export data for CSV, JSON, NDJSON, SQL or XML.
Sources
- Catalan number — Wikipedia — CC BY-SA 4.0
- OEIS A000108 — Catalan numbers — CC BY-SA 4.0
- MacTutor History of Mathematics — Eugène Catalan — CC BY-SA 4.0
- Mingantu — Wikipedia — CC BY-SA 4.0
Historical summaries on this page draw on the openly licensed references listed above. Spotted an error? Tell us and we will fix it.