Catalan Number Generator
Work out the nth Catalan number from n. C(n) = (2n choose n) ÷ (n + 1), and the page prints the substitution so the result can be checked by hand.
Catalan Number Generator
Work out the nth Catalan number from n. C(n) = (2n choose n) ÷ (n + 1), and the page prints the substitution so the result can be checked by hand.
How this page computes
C(n) = (2n choose n) ÷ (n + 1)
C(n) counts the balanced bracketings of n pairs, the binary trees with n internal nodes, and the lattice paths that never go above the diagonal. The three counts agree because they are the same recurrence.
The division by n + 1 is exact, and the page relies on that identity rather than dividing a rounded value.
The calculation runs entirely in this browser tab; nothing is uploaded.
Catalan Number Generator computes the nth Catalan number. C(n) = (2n choose n) ÷ (n + 1). The page prints the rule, the numbers substituted into it and the result, so the arithmetic can be checked by hand.
C(n) counts the balanced bracketings of n pairs, the binary trees with n internal nodes, and the lattice paths that never go above the diagonal. The three counts agree because they are the same recurrence. Pressed with n 10, it answers: C10 = 16796
How to use Catalan Number Generator
Enter n 10, then press Run: the page evaluates the nth Catalan number and prints every line of the working. Typed input is read exactly as written, and a blank field is refused with its name.
Read the first line as the answer and the lines below it as the substitution. If a value is out of range the page refuses it by field and reason instead of printing a number.
With n 10, the answer is C10 = 16796.
Where Catalan numbers count
C(n) counts the balanced bracketings of n pairs, the binary trees with n internal nodes, and the lattice paths that never go above the diagonal. The three counts agree because they are the same recurrence.
The division by n + 1 is exact, and the page relies on that identity rather than dividing a rounded value.
What to Expect
Best for
- Working out the nth Catalan number without a spreadsheet
- Checking a figure someone else quoted
- Seeing the formula behind an answer
Not ideal for
- n above 500 is refused: the 500th Catalan number has 300 digits and the page prints every one.
- A quantity the page cannot compute, which it refuses instead of estimating
- Rounding an answer that has an exact form
What this tool keeps
- C(n) = (2n choose n) ÷ (n + 1)
- Every input exactly as typed
What may need cleanup
- Nothing: the printed answer is the final output
- A unit conversion, if the inputs were entered in different units
Common errors
- n above 500 is refused: the 500th Catalan number has 300 digits and the page prints every one.
- An empty field is refused with the field's name
Example use cases
- Work out the nth Catalan number for one set of inputs
- Check the result against the formula by hand
- See which input the answer is most sensitive to
Sample input
Catalan Number Generator: n 10
Sample output
C10 = 16796 — C(n) = (2n choose n) ÷ (n + 1); for n = 10 that is 184756 ÷ 11.
Who this is for
- Students checking a formula
- Anyone who needs the number and the working
Frequently asked questions
What formula does this page use?
C(n) = (2n choose n) ÷ (n + 1). The page prints the substitution as well, so the answer can be checked against the rule.
What does Catalan Number Generator refuse?
n above 500 is refused: the 500th Catalan number has 300 digits and the page prints every one.
What does the default example give?
N 10 gives C10 = 16796. Every line below that restates the same arithmetic.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.