Number of Dyck Paths Bounded by $M$

This is essentially OEIS A080934, in which $T(n,k)$ is the number of Dyck paths of length $2n$ with all values less than or equal to $k$.

Suppose that such a path of length $2n+2$ last hits the $x$-axis at $\langle 2i,0\rangle$, where $0\le i\le n$; clearly there are $T(i,k)$ possibilities for the path from $\langle 0,0\rangle$ to $\langle 2i,0\rangle$. The first step after that must be an up-step, to $\langle 2i+1,1\rangle$, the last step must be a down-step, from $\langle 2n-1,1\rangle$ to $\langle 2n+2,0\rangle$, and between $\langle 2i+1,1\rangle$ and $\langle 2n+1,1\rangle$ the path cannot drop below the line $y=1$. Thus, the path from $\langle 2i+1,1\rangle$ to $\langle 2n+1,1\rangle$ must be one of the $T(n-i,k-1)$ paths from $\langle 0,0\rangle$ to $\langle 2(n-i),0\rangle$ that don’t rise above the line $y=k-1$, but shifted $2i+1$ units to the right and one unit up. It follows that

$$T(n+1,k)=\sum_{i=0}^nT(i,k)T(n-i,k-1)\;.\tag{1}$$

The initial conditions are $T(0,k)=1$ for all $k\in\Bbb N$ and $T(n,0)=[n=0]$, where the bracket is an Iverson bracket. (The recurrence $(1)$ is given in the OEIS entry, but with the wrong limits on the summation.) A closed form does not seem to be known; here are the first few values.

$$\begin{array}{c|cc} k\backslash n&0&1&2&3&4&5&6&7&8&9\\ \hline 0&\color{red}{1}&0&0&0&0&0&0&0&0&0&\\ 1&1&\color{red}{1}&1&1&1&1&1&1&1&1&\\ 2&1&1&\color{red}{2}&4&8&16&32&64&128&256&\\ 3&1&1&2&\color{red}{5}&13&34&89&233&610&1597&\\ 4&1&1&2&5&\color{red}{14}&41&122&365&1094&3281&\\ 5&1&1&2&5&14&\color{red}{42}&131&417&1341&4334&\\ 6&1&1&2&5&14&42&\color{red}{132}&428&1416&4744&\\ 7&1&1&2&5&14&42&132&\color{red}{429}&1429&4846&\\ 8&1&1&2&5&14&42&132&429&\color{red}{1430}&4861&\\ 9&1&1&2&5&14&42&132&429&1430&\color{red}{4862} \end{array}$$

The diagonal and everything below it is of course the Catalan numbers. The first four rows of the table are familiar ($T(n,3)=F_{2n-1}$). The OEIS entry has generating functions for the rows.

OEIS A080936 gives the number of Dyck paths of length $2n$ and height exactly $k$ and has a little more information on the generating functions.