CITE THIS NOTEBOOK: Exploring Catalan numbers by Peter Cullen Burbery. Wolfram Community OCT 14 2022.
I analyze several applications of Catalan numbers.Computations here are based on my recreational mathematics paclet: https://resources.wolframcloud.com/PacletRepository/resources/PeterBurbery/RecreationalMathematics/

Catalan Sequences

Find the 20th totally balanced binary sequence with five 1’s:
In[]:=
CatalanUnrank[5,20]
Out[]=
{0,0,1,0,1,0,1,1,0,1}
Find the number of totally balanced binary sequences with five 1's:
In[]:=
CatalanNumber[5]
Out[]=
42
Show the totally balanced binary sequences with five 1’s:
In[]:=
CatalanUnrank[5,#]&/@Range[0,CatalanNumber[5]-1]
Out[]=
{{0,0,0,0,0,1,1,1,1,1},{0,0,0,0,1,0,1,1,1,1},{0,0,0,0,1,1,0,1,1,1},{0,0,0,0,1,1,1,0,1,1},{0,0,0,0,1,1,1,1,0,1},{0,0,0,1,0,0,1,1,1,1},{0,0,0,1,0,1,0,1,1,1},{0,0,0,1,0,1,1,0,1,1},{0,0,0,1,0,1,1,1,0,1},{0,0,0,1,1,0,0,1,1,1},{0,0,0,1,1,0,1,0,1,1},{0,0,0,1,1,0,1,1,0,1},{0,0,0,1,1,1,0,0,1,1},{0,0,0,1,1,1,0,1,0,1},{0,0,1,0,0,0,1,1,1,1},{0,0,1,0,0,1,0,1,1,1},{0,0,1,0,0,1,1,0,1,1},{0,0,1,0,0,1,1,1,0,1},{0,0,1,0,1,0,0,1,1,1},{0,0,1,0,1,0,1,0,1,1},{0,0,1,0,1,0,1,1,0,1},{0,0,1,0,1,1,0,0,1,1},{0,0,1,0,1,1,0,1,0,1},{0,0,1,1,0,0,0,1,1,1},{0,0,1,1,0,0,1,0,1,1},{0,0,1,1,0,0,1,1,0,1},{0,0,1,1,0,1,0,0,1,1},{0,0,1,1,0,1,0,1,0,1},{0,1,0,0,0,0,1,1,1,1},{0,1,0,0,0,1,0,1,1,1},{0,1,0,0,0,1,1,0,1,1},{0,1,0,0,0,1,1,1,0,1},{0,1,0,0,1,0,0,1,1,1},{0,1,0,0,1,0,1,0,1,1},{0,1,0,0,1,0,1,1,0,1},{0,1,0,0,1,1,0,0,1,1},{0,1,0,0,1,1,0,1,0,1},{0,1,0,1,0,0,0,1,1,1},{0,1,0,1,0,0,1,0,1,1},{0,1,0,1,0,0,1,1,0,1},{0,1,0,1,0,1,0,0,1,1},{0,1,0,1,0,1,0,1,0,1}}

Grouping Symbols

Find all sets of 3 parentheses that are balanced:
In[]:=
AllBalancedGroupingSymbols[{"(",")"},3]
Out[]=
{((())),(()()),(())(),()(()),()()()}

Parentheses ()

In[]:=
AllBalancedGroupingSymbols[{"(",")"},4]
Out[]=
{(((()))),((()())),((())()),((()))(),(()(())),(()()()),(()())(),(())(()),(())()(),()((())),()(()()),()(())(),()()(()),()()()()}

Angle Brackets 〈〉

In[]:=
AllBalancedGroupingSymbols[{"〈","〉"},4]
Out[]=
{〈〈〈〈〉〉〉〉,〈〈〈〉〈〉〉〉,〈〈〈〉〉〈〉〉,〈〈〈〉〉〉〈〉,〈〈〉〈〈〉〉〉,〈〈〉〈〉〈〉〉,〈〈〉〈〉〉〈〉,〈〈〉〉〈〈〉〉,〈〈〉〉〈〉〈〉,〈〉〈〈〈〉〉〉,〈〉〈〈〉〈〉〉,〈〉〈〈〉〉〈〉,〈〉〈〉〈〈〉〉,〈〉〈〉〈〉〈〉}

Square Brackets []

In[]:=
AllBalancedGroupingSymbols[{"[","]"},4]
Out[]=
{[[[[]]]],[[[][]]],[[[]][]],[[[]]][],[[][[]]],[[][][]],[[][]][],[[]][[]],[[]][][],[][[[]]],[][[][]],[][[]][],[][][[]],[][][][]}

Curly Brackets {}

In[]:=
AllBalancedGroupingSymbols[{"{","}"},4]
Out[]=
{{{{{}}}},{{{}{}}},{{{}}{}},{{{}}}{},{{}{{}}},{{}{}{}},{{}{}}{},{{}}{{}},{{}}{}{},{}{{{}}},{}{{}{}},{}{{}}{},{}{}{{}},{}{}{}{}}

Floor Brackets ⌊⌋

In[]:=
AllBalancedGroupingSymbols[{"⌊","⌋"},4]
Out[]=
{⌊⌊⌊⌊⌋⌋⌋⌋,⌊⌊⌊⌋⌊⌋⌋⌋,⌊⌊⌊⌋⌋⌊⌋⌋,⌊⌊⌊⌋⌋⌋⌊⌋,⌊⌊⌋⌊⌊⌋⌋⌋,⌊⌊⌋⌊⌋⌊⌋⌋,⌊⌊⌋⌊⌋⌋⌊⌋,⌊⌊⌋⌋⌊⌊⌋⌋,⌊⌊⌋⌋⌊⌋⌊⌋,⌊⌋⌊⌊⌊⌋⌋⌋,⌊⌋⌊⌊⌋⌊⌋⌋,⌊⌋⌊⌊⌋⌋⌊⌋,⌊⌋⌊⌋⌊⌊⌋⌋,⌊⌋⌊⌋⌊⌋⌊⌋}

Ceiling Brackets ⌈⌉

In[]:=
AllBalancedGroupingSymbols[{"⌈","⌉"},4]
Out[]=
{⌈⌈⌈⌈⌉⌉⌉⌉,⌈⌈⌈⌉⌈⌉⌉⌉,⌈⌈⌈⌉⌉⌈⌉⌉,⌈⌈⌈⌉⌉⌉⌈⌉,⌈⌈⌉⌈⌈⌉⌉⌉,⌈⌈⌉⌈⌉⌈⌉⌉,⌈⌈⌉⌈⌉⌉⌈⌉,⌈⌈⌉⌉⌈⌈⌉⌉,⌈⌈⌉⌉⌈⌉⌈⌉,⌈⌉⌈⌈⌈⌉⌉⌉,⌈⌉⌈⌈⌉⌈⌉⌉,⌈⌉⌈⌈⌉⌉⌈⌉,⌈⌉⌈⌉⌈⌈⌉⌉,⌈⌉⌈⌉⌈⌉⌈⌉}

Double Square Brackets 〚〛]

In[]:=
AllBalancedGroupingSymbols[{"〚","〛"},4]
Out[]=
{〚〚〚〚〛〛〛〛,〚〚〚〛〚〛〛〛,〚〚〚〛〛〚〛〛,〚〚〚〛〛〛〚〛,〚〚〛〚〚〛〛〛,〚〚〛〚〛〚〛〛,〚〚〛〚〛〛〚〛,〚〚〛〛〚〚〛〛,〚〚〛〛〚〛〚〛,〚〛〚〚〚〛〛〛,〚〛〚〚〛〚〛〛,〚〛〚〚〛〛〚〛,〚〛〚〛〚〚〛〛,〚〛〚〛〚〛〚〛}

Bracketing Bars 

In[]:=
AllBalancedGroupingSymbols[{"",""},4]
Out[]=
{,,,,,,,,,,,,,}

Bracketing Bars 

In[]:=
AllBalancedGroupingSymbols[{"",""},4]
Out[]=
{,,,,,,,,,,,,,}

String Template <*…*> symbols

In[]:=
AllBalancedGroupingSymbols[{"<*","*>"},4]
Out[]=
{<*<*<*<**>*>*>*>,<*<*<**><**>*>*>,<*<*<**>*><**>*>,<*<*<**>*>*><**>,<*<**><*<**>*>*>,<*<**><**><**>*>,<*<**><**>*><**>,<*<**>*><*<**>*>,<*<**>*><**><**>,<**><*<*<**>*>*>,<**><*<**><**>*>,<**><*<**>*><**>,<**><**><*<**>*>,<**><**><**><**>}

Association Template <*…*> symbols

In[]:=
AllBalancedGroupingSymbols[{"<|",">"},4]
Out[]=
{<|<|<|<|>>>>,<|<|<|><|>>>,<|<|<|>><|>>,<|<|<|>>><|>,<|<|><|<|>>>,<|<|><|><|>>,<|<|><|>><|>,<|<|>><|<|>>,<|<|>><|><|>,<|><|<|<|>>>,<|><|<|><|>>,<|><|<|>><|>,<|><|><|<|>>,<|><|><|><|>}

Mountain Range

I made a function that will make all mountain ranges named DyckPaths:
In[]:=
Multicolumn[DyckPaths[3]]
Out[]=
​
In[]:=
Multicolumn[DyckPaths[4]]
Out[]=
​
​

Walks above or below the diagonal

I made a function that plots all walks above or below the diagonal.

Parenthesized Expressions

I made another function that calculates the parenthesized expressions with a certain number of variables.

Full Binary Trees

I made a function to list all full binary trees with n leaves.

Regular Polygon Triangulations

Catalan numbers are also related to triangulations of regular polygons:
Solving Puzzles
These puzzles are from Brilliant‘s wiki page on Catalan numbers.

Restricted random walks

A man walks n blocks north and n blocks west of his residence. Every day he has 2n blocks to walk. How many routes are possible if he never crosses the diagonal line from home to office?
Make a plot:
Count the walks:
Write the answer:

Binary Trees

A rooted binary tree is a tree with one root node, where each node has either zero or two branches descending from it. A node is internal if it has two nodes coming from it. How many rooted binary trees are there with n internal nodes?
Make a table of the # of full binary trees:
Write the answer:
Applications in Combinatorics
This section is from the Wikipedia article on Catalan numbers.
There are many counting problems in combinatorics whose solution is given by the Catalan numbers. The book Enumerative Combinatorics: Volume 2 by combinatorialist Richard P. Stanley contains a set of exercises which describe 66 different interpretations of the Catalan numbers. Following are some examples, with illustrations of the cases C3 = 5 and C4 = 14.