\documentclass[12pt,reqno]{article} \usepackage[usenames]{color} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amscd} \usepackage{graphicx} \usepackage[colorlinks=true, linkcolor=webgreen, filecolor=webbrown, citecolor=webgreen]{hyperref} \definecolor{webgreen}{rgb}{0,.5,0} \definecolor{webbrown}{rgb}{.6,0,0} \usepackage{color} \usepackage{fullpage} \usepackage{float} \usepackage{psfig} \usepackage{graphics} \usepackage{latexsym} \usepackage{epsf} \usepackage{breakurl} \usepackage{tikz} \usepackage{tikz-cd} \usetikzlibrary{matrix} \usetikzlibrary{fit,shapes} \usetikzlibrary{positioning, calc} \tikzset{circle node/.style = {circle,inner sep=1pt,draw, fill=white}, X node/.style = {fill=white, inner sep=1pt}, dot node/.style = {circle, draw, inner sep=5pt} } \usepackage{tkz-fct} \newcommand{\myboxedtext}[2][rectangle,draw,fill=white,rounded corners]{% \tikz[baseline=-0.6ex] \node [#1,rounded corners]{#2};}% \setlength{\textwidth}{6.5in} \setlength{\oddsidemargin}{.1in} \setlength{\evensidemargin}{.1in} \setlength{\topmargin}{-.1in} \setlength{\textheight}{8.4in} \newcommand{\seqnum}[1]{\href{https://oeis.org/#1}{\underline{#1}}} \begin{document} \begin{center} \epsfxsize=4in \leavevmode\epsffile{logo129.eps} \end{center} \theoremstyle{plain} \newtheorem{theorem}{Theorem} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{example}[theorem]{Example} \newtheorem{conjecture}[theorem]{Conjecture} \theoremstyle{remark} \newtheorem{remark}[theorem]{Remark} \begin{center} \vskip 1cm{\LARGE\bf Generalized Catalan Numbers Associated \\ \vskip .11in with a Family of Pascal-like Triangles} \vskip 1cm \large Paul Barry\\ School of Science\\ Waterford Institute of Technology\\ Ireland\\ \href{mailto:pbarry@wit.ie}{\tt pbarry@wit.ie} \end{center} \vskip .2 in \begin{abstract} We find closed-form expressions and continued fraction generating functions for a family of generalized Catalan numbers associated with a set of Pascal-like number triangles that are defined by Riordan arrays. We express these generalized Catalan numbers as the moments of appropriately defined orthogonal polynomials. We also describe them as the row sums of related Riordan arrays. Links are drawn to the Narayana numbers and to lattice paths. We further generalize this one-parameter family to a three-parameter family. We use the generalized Catalan numbers to define generalized Catalan triangles. We define various generalized Motzkin numbers defined by these general Catalan numbers. Finally we indicate that the generalized Catalan numbers can be associated with certain generalized Eulerian numbers by means of a special transform. \end{abstract} \section{Introduction} The Catalan numbers \cite{Stanley} are among the most important numbers in combinatorics. They have many important properties, which are shared to one degree or another with related sequences. This has prompted works which extend or generalize the Catalan numbers in various ways \cite{Aigner, He}. In this note, we use the theory of Riordan arrays, and in particular a family of Pascal-like Riordan arrays, to find families of generalized Catalan numbers. A short introduction to Riordan arrays is provided later in this section. In fact, we find families of Catalan-like polynomials, which through specialization, give us generalized Catalan numbers. All are found to be moment sequences, like the Catalan numbers themselves, and in most cases we give their Hankel transforms. A feature that they share is that the coefficient arrays of the defining orthogonal polynomials are Riordan arrays. The Catalan numbers $$C_n=\frac{1}{n+1}\binom{2n}{n}$$ \seqnum{A000108} which begin $$1,1,2,5,14,42,132, 429,\ldots,$$ occur in two ways in Pascal's triangle $(B_{n,k}=\binom{n}{k})$. First of all, as indicated by the above formula, they are equal to the central binomial coefficients $\binom{2n}{n}$, divided by $n+1$. That $\binom{2n}{n}$ is divisible by $n+1$ for all $n$ is an interesting arithmetical property of Pascal's triangle \cite{Edwards}. As is well-known, the central binomial coefficients $\binom{2n}{n}$ \seqnum{A000984}, form the central spine of Pascal's triangle \seqnum{A007318} when it is viewed as a centrally symmetric (or palindromic) triangle. $$\begin{array}{ccccccccccccc} & & & & & & \myboxedtext{1} & & & & & & \\ & & & & & 1& &1 & & & & & \\ & & & & 1& & \myboxedtext{2} & &1 & & & & \\ & & &1 & &3 & &3 & &1 & & & \\ & & 1& &4 & & \myboxedtext{6} & &4 & &1 & & \\ & 1& &5 & &10 & &10 & &5 & & 1& \\ 1 & & 6 & & 15 & & \myboxedtext{20} & & 15 & & 6 & & 1 \end{array} $$ The alternative view of the Catalan numbers is as $$C_n=B_{2n,n}-B_{2n,n-1}=\binom{2n}{n}-\binom{2n}{n-1}=\binom{2n}{n}-\binom{2n}{n+1}.$$ We illustrate $C_n=\binom{2n}{n}-\binom{2n}{n+1}$ below. $$\begin{array}{ccccccccccccc} & & & & & & \myboxedtext{1} & & & & & & \\ & & & & & 1& &1 & & & & & \\ & & & & 1& & \myboxedtext{2} & &\myboxedtext{1} & & & & \\ & & &1 & &3 & &3 & &1 & & & \\ & & 1& &4 & & \myboxedtext{6} & & \myboxedtext{4} & &1 & & \\ & 1& &5 & &10 & &10 & &5 & & 1& \\ 1 & & 6 & & 15 & & \myboxedtext{20} & & \myboxedtext{15} & & 6 & & 1 \end{array} $$ When we view Pascal's triangle as a lower-triangular matrix, we see these numbers as the difference of adjacent elements on alternate rows. $$\left( \begin{array}{ccccccc} \myboxedtext{1} & \myboxedtext{0} & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & \myboxedtext{2} & \myboxedtext{1} & 0 & 0 & 0 & 0 \\ 1 & 3 & 3 & 1 & 0 & 0 & 0 \\ 1 & 4 & \myboxedtext{6} & \myboxedtext{4} & 1 & 0 & 0 \\ 1 & 5 & 10 & 10 & 5 & 1 & 0 \\ 1 & 6 & 15 & \myboxedtext{20} & \myboxedtext{15} & 6 & 1 \\ \end{array} \right).$$ We recall that $\binom{2n}{n}$ has the generating function $$\sum_{k=0}^n \binom{2n}{n}x^n = \frac{1}{\sqrt{1-4x}},$$ while the Catalan numbers $C_n$ have the generating function $$c(x)=\frac{1-\sqrt{1-4x}}{2x}.$$ We then have $$c(x)=\frac{1}{x} \text{Rev}(x(1-x)),$$ and $$c(x)= \cfrac{1}{1-x- \cfrac{x^2}{1-2x- \cfrac{x^2}{1-2x- \cfrac{x^2}{1-2x-\cdots}}}}.$$ Here, the notation $\text{Rev}$ refers to the reversion of a power series. If $f(x)$ is a power series with $f(0)=0$ and $f'(0)\ne 0$, then $\bar{f}(x)=\text{Rev}(f)(x)$ is the solution $u=u(x)$ to the equation $f(u)=x$ such that $u(0)=0$. The Catalan numbers $C_n$ are the row sums of the Riordan array $$(1, x(1-x))^{-1}=(1, xc(x)).$$ We also have the moment representation $$C_n=\frac{1}{2\pi} \int_0^4 \frac{\sqrt{x(4-x)}}{x}\,dx.$$ In the sequel, we shall generalize the Catalan numbers, and we shall seek to state the generalizations of the foregoing statements. We shall be principally interested in this note in a family of Pascal-like triangles $(T_{n,k}(r))$ depending on an integer parameter $r$, where $T_{n,k}(0)=B_{n,k}$. That is, Pascal's triangle coincides with $r=0$. For $r=1$, we get the Delannoy triangle \seqnum{A008288} which begins $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 3 & 1 & 0 & 0 & 0 & 0 \\ 1 & 5 & 5 & 1 & 0 & 0 & 0 \\ 1 & 7 & 13 & 7 & 1 & 0 & 0 \\ 1 & 9 & 25 & 25 & 9 & 1 & 0 \\ 1 & 11 & 41 & 63 & 41 & 11 & 1 \\ \end{array} \right).$$ The generalized Catalan numbers $T_{2n,n}(1)-T_{2n,n+1}(1)$ in this case begin $$1,2,6,22,\ldots.$$ These are the Schroeder numbers \seqnum{A006318}, which count Schroeder paths from $(0,0)$ to $(2n,0)$. $$\left( \begin{array}{ccccccc} \myboxedtext{1} & \myboxedtext{0} & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & \myboxedtext{3} & \myboxedtext{1} & 0 & 0 & 0 & 0 \\ 1 & 5 & 5 & 1 & 0 & 0 & 0 \\ 1 & 7 & \myboxedtext{13} & \myboxedtext{7} & 1 & 0 & 0 \\ 1 & 9 & 25 & 25 & 9 & 1 & 0 \\ 1 & 11 & 41 & \myboxedtext{63} & \myboxedtext{41} & 11 & 1 \\ \end{array} \right).$$ Integer sequences in this note are referred to by their $Annnnnn$ number from the On-Line Encyclopedia of Integer Sequences \cite{SL1, SL2} where such a number is known. All matrices in this note are integer valued, lower triangular, and invertible. In particular the main diagonal will always consist of all $1$'s. Where examples are given, a suitable truncation is shown. We recall that an ordinary Riordan array $(g(x),f(x))$ \cite{Book, Survey, SGWW} is defined by two generating functions, $$g(x)=g_0+g_1 x+ g_2 x^2 +\cdots, \quad g_0 \ne 0,$$ and $$f(x)= f_1 x+f_2 x^2+ f_3 x^3+ \cdots, \quad f_1 \ne 0,$$ with the $(n,k)$-th element of the corresponding lower-triangular matrix being given by $$[x^n] g(x)f(x)^k.$$ In the sequel we shall always assume that $g_0=f_1=1$. The inverse of the Riordan array $(g(x),f(x))$ is given by $$(g(x),f(x))^{-1}=\left(\frac{1}{g(\bar{f}(x))}, \bar{f}\right),$$ where $\bar{f}(x)$ denotes the compositional inverse of $f(x)$. Thus we have $f(\bar{f}(x))=x$ and $\bar{f}(f(x))=x$. The product law for Riordan arrays (which coincides with matrix multiplication) is given by $$(g(x), f(x)) \cdot (u(x), v(x))= (g(x)u(f(x)), v(f(x)).$$ The Hankel transform \cite{Kratt, Layman} of a sequence $a_n$ is the sequence $h_n$ where $h_n=|a_{i+j}|_{0 \le i,j \le n}$. If the g.f. of $a_n$ is expressible as a continued fraction \cite{CFT, Wall} of the form $$\cfrac{\mu_0}{1-\alpha_0 x- \cfrac{\beta_1 x^2}{1-\alpha_1 x - \cfrac{\beta_2 x^2}{1-\alpha_2 x - \cfrac{\beta_3 x^2}{1-\alpha_3 x -\cdots}}}},$$ then the Hankel transform of $a_n$ is given by \cite{Kratt} the Heilermann formula $$h_n=\mu_0^{n+1}\beta_1^n\beta_2^{n-1}\cdots\beta_{n-1}^2\beta_n.$$ \noindent If the g.f. of $a_n$ is expressible as the following type of continued fraction: $$\cfrac{\mu_0}{1+ \cfrac{\gamma_1 x}{1+ \cfrac{\gamma_2 x}{1+\cdots}}},$$ then we have $$h_n=\mu_0^{n+1}(\gamma_1 \gamma_2)^n (\gamma_3 \gamma_4)^{n-1} \cdots (\gamma_{2n-3} \gamma_{2n-2})^2 (\gamma_{2n-1}\gamma_{2n}).$$ A Motzkin path of length $n$ is a lattice path from $(0,0)$ to $(n,0)$ with steps northeast, $(1,1)$, east $(1,0)$ and southeast, $(1,-1)$, that does not go below the $x$-axis. A Schroeder path of semi-length $n$ is a lattice path from $(0,0)$ to $(2n,0)$ with steps northeast, $(1,1)$, east $(2,0)$ and southeast, $(1,-1)$, that does not go below the $x$-axis. \section{Generalized Catalan numbers} The Riordan array $$\left(\frac{1}{1-x}, \frac{x(1+rx)}{1-x}\right)$$ defines a Pascal-like matrix \cite{Cons} with general term $T_{n,k}$ given by \begin{equation}T_{n,k}(r)=\sum_{j=0}^k \binom{k}{j}\binom{n-j}{k}r^j=\sum_{j=0}^{n-k}\binom{k}{j}\binom{n-k}{j}(r+1)^j.\end{equation} These number triangles are ``Pascal-like'' in the sense that $$T_{n,k}=T_{n,n-k}, T_{n,0}=1,T_{n,n}=1,T_{n,k}=0\, \text{for}\, n>k.$$ This array begins $$\left( \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 \\ 1 & r+2 & 1 & 0 & 0 & 0 \\ 1 & 2 r+3 & 2 r+3 & 1 & 0 & 0 \\ 1 & 3 r+4 & r^2+6 r+6 & 3 r+4 & 1 & 0 \\ 1 & 4 r+5 & 3 r^2+12 r+10 & 3 r^2+12 r+10 & 4 r+5 & 1 \\ \end{array} \right).$$ We have $$T_{n,k}(0)=\binom{n}{k},$$ hence for $r=0$, the obtained number triangle is indeed Pascal's triangle \seqnum{A007318}. The central coefficients of these triangles are given by $$T_{2n,n}(r)=\sum_{k=0}^n \binom{n}{k}\binom{2n-k}{n}r^k=\sum_{k=0}^n \binom{n}{k}^2(r+1)^k.$$ Similarly, we have that $$T_{2n,n-1}(r)=\sum_{k=0}^{n-1}\binom{n-1}{k}\binom{2n-k}{n-1}r^k=\sum_{k=0}^n \binom{n-1}{n-1-k}\binom{n+1}{k}(r+1)^k.$$ We define the \emph{generalized Catalan numbers} associated with the Riordan array $\left(\frac{1}{1-x}, \frac{x(1+rx)}{1-x}\right)$ to be the numbers \begin{equation}C_n(r)=T_{2n,n}(r)-T_{2n,n-1}(r).\end{equation} $$\left( \begin{array}{cccccc} \boxed{1} & \boxed{0} & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 \\ 1 & \boxed{r+2} & \boxed{1} & 0 & 0 & 0 \\ 1 & 2 r+3 & 2 r+3 & 1 & 0 & 0 \\ 1 & 3 r+4 & \boxed{r^2+6 r+6} & \boxed{3 r+4} & 1 & 0 \\ 1 & 4 r+5 & 3 r^2+12 r+10 & 3 r^2+12 r+10 & 4 r+5 & 1 \\ \end{array} \right).$$ The polynomial sequence $C_n(r)$ begins $$1, r+1, r^2+3r+2, \ldots.$$ \begin{proposition} The generating function of $C_n(r)$ is given by $$c(x;r)=\frac{1-rx-\sqrt{1-2x(r+2)+r^2x^2}}{2x}.$$ \end{proposition} \begin{proof} By \cite{Central}, we have that the generating function of $T_{2n,n}(r)$ is given by $$\frac{1}{\sqrt{1-2x(r+2)+r^2x^2}}.$$ We now let $$\left(\frac{1}{1-x}, \frac{x(1+rx)}{1-x}\right)=(G(x), xF(x)).$$ Then \begin{align*} T_{2n,n-1}&=[x^{2n}]G(x)(xF(x))^{n-1}\\ &=[x^n]\frac{G(x)}{xF(x)^2}F(x)^{n+1}\\ &=(n+1) \frac{1}{n+1}[x^n]\frac{G(x)}{xF(x)^2}F(x)^{n+1}\\ &=[x^n] \frac{G(v(x))}{v(x)F(v(x))^2}v'(x)\end{align*} where $$v(x)=\text{Rev}\left(\frac{x}{F(x)}\right),$$ and where we have used Lagrange inversion \cite{Central, Lagrange}. Now in this case we have $$v(x)=\text{Rev}\left(\frac{x(1-x)}{1+rx}\right)=\frac{1-rx-\sqrt{1-2x(r+2)+r^2x^2}}{2}.$$ We find that the generating function of $T_{2n,n-1}(r)$ is given by $$\frac{(1-rx+\sqrt{1-2x(r+2)+r^2x^2})^2}{4x \sqrt{1-2x(r+2)+r^2x^2}}.$$ Thus the generating function $c(x;r)$ of $C_n(r)$ is given by $$\frac{1}{\sqrt{1-2x(r+2)+r^2x^2}}-\frac{(1-rx+\sqrt{1-2x(r+2)+r^2x^2})^2}{4x \sqrt{1-2x(r+2)+r^2x^2}},$$ or $$c(x;r)=\frac{1-rx-\sqrt{1-2x(r+2)+r^2x^2}}{2x}.$$ \end{proof} \begin{corollary} We have $$c(x;r)=\frac{1}{1-rx}c\left(\frac{x}{(1-rx)^2}\right).$$ \end{corollary} \begin{proof} Expansion shows that both forms are equal. \end{proof} \begin{corollary} \begin{equation}C_n(r)=\sum_{k=0}^n \binom{n+k}{2k}r^{n-k}C_k.\end{equation} \end{corollary} \begin{proof} We have $$c(x;r)=\frac{1}{1-rx}c\left(\frac{x}{(1-rx)^2}\right)=\left(\frac{1}{1-rx}, \frac{x}{(1-rx)^2}\right)\cdot c(x).$$ The Riordan array $\left(\frac{1}{1-rx}, \frac{x}{(1-rx)^2}\right)$ has $(n,k)$-th term $\binom{n+k}{2k}r^{n-k}$, whence the result. \end{proof} We note that the (large) Schroeder numbers \seqnum{A006318} $S_n$ have the formula $$S_n=\sum_{k=0}^n \binom{n+k}{2k}C_k.$$ Thus there is justification for calling our numbers generalized Schroeder numbers. Nevertheless, we shall continue to call them generalized Catalan numbers in this note (and consequently we regard the large Schroeder numbers as elements of this family, corresponding to $r=1$). The numbers $C_n(r)$ count the number of Schroeder paths of semi-length $n$ where the level steps have $r$ possible colors (see \seqnum{A006318}, \seqnum{A047891}, \seqnum{A082298}, \seqnum{A082301} and \seqnum{A082302}). \begin{corollary} We have that $c(x;r)$ has the following continued fraction expansion. $$c(x;r)= \cfrac{1}{1-rx- \cfrac{x}{1-rx- \cfrac{x}{1-rx-\cdots}}}.$$ \end{corollary} \begin{proof} We solve the equation $$u=\frac{1}{1-rx-x u}$$ to find that $u(x)=c(x;r)$. \end{proof} \begin{corollary} We have that $c(x;r)$ has the following continued fraction expansion. $$c(x;r)= \cfrac{1}{1- \cfrac{x(r+1)}{1- \cfrac{x}{1- \cfrac{x(r+1)}{1- \cfrac{x}{1-\cdots}}}}}.$$ \end{corollary} \begin{proof} We solve the equation $$u=\cfrac{1}{1-\cfrac{x(r+1)}{1-x u}}$$ to find that $u(x)=c(x;r)$. \end{proof} \begin{corollary} We have \begin{equation}C_n(r)=\sum_{k=0}^n \frac{1}{n-k+1}\binom{2n-k}{n}\binom{n}{k}r^k.\end{equation} \end{corollary} \begin{proof} The number triangle \seqnum{A060693} with general element $\frac{1}{n-k+1}\binom{2n-k}{n}\binom{n}{k}$ is equal to $$[1,1,1,\ldots]\,\Delta\,[1,0,1,0,\ldots]$$ in the Del\'eham notation \cite{CFT}. The result follows from the previous result. \end{proof} \begin{corollary} Let $$N_{n,k}=\frac{1}{n+1}\binom{n+1}{k}\binom{n-1}{n-k}=0^{n+k}+\frac{1}{n+0^{nk}}\binom{n}{k}\binom{n}{k-1}$$ denote the $(n,k)$-th element of the Narayana triangle that begins $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 3 & 1 & 0 & 0 & 0 \\ 0 & 1 & 6 & 6 & 1 & 0 & 0 \\ 0 & 1 & 10 & 20 & 10 & 1 & 0 \\ 0 & 1 & 15 & 50 & 50 & 15 & 1 \\ \end{array} \right).$$ Then we have \begin{equation}C_n(r)=\sum_{k=0}N_{n,k}(r+1)^k.\end{equation} \end{corollary} \begin{proof} In effect, the number triangle \seqnum{A060693} is the product of the Narayana triangle $(N_{n,k})$ and the binomial triangle. \end{proof} \begin{proposition} We have $$c(x;r)=\frac{1}{x}\text{Rev}\left(\frac{x(1-x)}{1+rx}\right).$$ \end{proposition} \begin{proof} Solving the equation $$\frac{u(1-u)}{1+ru}=x$$ we find that the branch with $u(0)=0$ gives us $$u(x)=\text{Rev}\left(\frac{x(1-x)}{1+rx}\right)=\frac{1-rx-\sqrt{1-2x(r+2)+r^2x^2}}{2}.$$ \end{proof} \begin{corollary} We have $$C_n(r)=\frac{1}{n+1}\sum_{k=0}^n \binom{n+1}{k}\binom{2n-k}{n}r^k.$$ \end{corollary} \begin{proof} We have \begin{align*} [x^n]\frac{1}{x}\text{Rev}\left(\frac{x(1-x)}{1+rx}\right) &=[x^{n+1}]\text{Rev}\left(\frac{x(1-x)}{1+rx}\right)\\ &=\frac{1}{n+1}[x^n]\left(\frac{1+rx}{1-x}\right)^{n+1}\end{align*} by Lagrange inversion. The result follows from this. \end{proof} We note that since $$\binom{n+1}{k}=\frac{n+1}{n-k+1} \binom{n}{k},$$ we retrieve the result that \begin{equation}C_n(r)=\sum_{k=0}^n \frac{1}{n-k+1} \binom{n}{k}\binom{2n-k}{n}r^k.\end{equation} \section{Orthogonal polynomials and generalized Catalan numbers} We recall that a family of polynomials $P_n(x)=\sum_{k=0}^n p_{n,k}x^k$ is a family of orthogonal polynomials if it satisfies a three term recurrence $$P_n(x)=(x-\alpha_n) P_{n-1}-\beta_n P_{n-2},$$ for suitable parameters $\alpha_n$ and $\beta_n$, and suitable initial conditions such as $P_{-1}(x)=0$ and $P_0(x)=1$, or $P_0(x)=1$ and $P_1(x)=x-a$. The coefficient array $(p_{n,k})$ will be a Riordan array \cite{Classical} if and only if it is of the form $$\left(\frac{1-\lambda x- \mu x}{1+a x + b x^2},\frac{x}{1+a x + bx^2}\right),$$ in which case we have $$P_n(x)=(x-a)P_{n-1}(x)-b P_{n-2}(x),$$ with $P_0(x)=1$, $P_1(x)=x-a-\lambda$, and $P_2(x)=x^2-(2a+\lambda)x+a^2+a \lambda-b-\mu$. This is equivalent to saying that $\alpha_n$ is the sequence $a+\lambda, a,a,a,\ldots$ and $\beta_n$ is the sequence $0,b+\lambda,b,b,b,\ldots.$ Equivalently, this is the case if the coefficient array $O=(p_{n,k})$ satisfies the following. Letting $M=O^{-1}$, we require that the \emph{production matrix} $P=M^{-1} \overline{M}$ be of the form $$\left( \begin{array}{ccccccc} a+\lambda & 1 & 0 & 0 & 0 & 0 & 0 \\ b+\mu & a & 1 & 0 & 0 & 0 & 0 \\ 0 & b & a & 1 & 0 & 0 & 0 \\ 0 & 0 & b & a & 1 & 0 & 0 \\ 0 & 0 & 0 & b & a & 1 & 0 \\ 0 & 0 & 0 & 0 & b & a & 1 \\ 0 & 0 & 0 & 0 & 0 & b & a \\ \end{array} \right).$$ Here, $\overline{M}$ is the matrix $M$ with its first row removed. If this is the case, we call $M$ the \emph{moment matrix} of the family of orthogonal polynomials $P_n(x)$ with coefficient array $O=(p_{n,k})$. The elements of the first column of $M$ are called the moments of the family of orthogonal polynomials $P_n(x)$. With these preliminaries dealt with, we can now give the following result. \begin{proposition} The generalized Catalan numbers $C_n(r)$ are the moments of the family of orthogonal polynomials whose coefficient array is given by the Riordan array $$\left(\frac{1+x}{1+(r+2)x+(r+1)x^2}, \frac{x}{1+(r+2)x+(r+1)x^2}\right).$$ \end{proposition} \begin{proof} We find that $$\left(\frac{1+x}{1+(r+2)x+(r+1)x^2}, \frac{x}{1+(r+2)x+(r+1)x^2}\right)^{-1}$$ $$=\left(c(x;r),\frac{1-x(r+2)-\sqrt{1-2x(r+2)+r^2x^2}}{2x(r+1)}\right).$$ \end{proof} The production matrix of the moment matrix $\left(\frac{1+x}{1+(r+2)x+(r+1)x^2}, \frac{x}{1+(r+2)x+(r+1)x^2}\right)^{-1}$ begins $$\left( \begin{array}{ccccccc} r+1 & 1 & 0 & 0 & 0 & 0 & 0 \\ r+1 & r+2 & 1 & 0 & 0 & 0 & 0 \\ 0 & r+1 & r+2 & 1 & 0 & 0 & 0 \\ 0 & 0 & r+1 & r+2 & 1 & 0 & 0 \\ 0 & 0 & 0 & r+1 & r+2 & 1 & 0 \\ 0 & 0 & 0 & 0 & r+1 & r+2 & 1 \\ 0 & 0 & 0 & 0 & 0 & r+1 & r+2 \\ \end{array} \right).$$ \begin{corollary} The Hankel transform of the generalized Catalan numbers $C_n(r)$ is given by $$h_n(r)=(r+1)^{\binom{n+1}{2}}.$$ \end{corollary} \begin{corollary} We have the following integral representation of $C_n(r)$. \begin{align*}C_n(r)&=\frac{1}{\pi}\int_{r+2-2\sqrt{r+1}}^{r+2+2\sqrt{r+1}} x^n \sqrt{\frac{-x^2+2x(r+2)-r^2}{2x}}\,dx\\ &=\frac{1}{\pi}\int_{r+2-2\sqrt{r+1}}^{r+2+2\sqrt{r+1}} x^n \frac{-(x-2-r-2\sqrt{r+1})(x-2-r+2\sqrt{r+1})}{2x}\,dx \end{align*} \end{corollary} We note that the density is of Mar\v cenko-Pastur type \cite{Marchenko, Yaskov}. \begin{proof} We apply the Stieltjes-Perron transform \cite{Henrici} to the generating function $c(x;r)$ of $C_n(r)$. \end{proof} \begin{example} We find that for the Catalan numbers $C_n$, we have the following well-known result. $$C_n= \frac{1}{\pi}\int_{0}^4 x^n \frac{\sqrt{x(4-x)}}{2x}\,dx.$$ \end{example} \begin{example} We find that for the large Schroeder numbers $S_n$ we have the following integral representation. \begin{align*}S_n&=\frac{1}{\pi}\int_{3-2\sqrt{2}}^{3+2\sqrt{2}} x^n \frac{\sqrt{-x^2+6x-1}}{2x}\,dx\\ &=\frac{1}{\pi}\int_{3-2\sqrt{2}}^{3+2\sqrt{2}} x^n \frac{-(x-3-2\sqrt{2})(x-3+2\sqrt{2})}{2x}\,dx.\end{align*} \end{example} \section{$C_n(r)$ as row sums} The following result exhibits the generalized Catalan numbers $C_n(r)$ as the row sums of a Riordan array. \begin{proposition} The generalized Catalan numbers $C_n(r)$ are the row sums of the Riordan array $$\left(\frac{1}{1+rx}, \frac{x(1-x)}{1+rx}\right)^{-1}.$$ \end{proposition}. \begin{proof} We have that $$\left(\frac{1}{1+rx}, \frac{x(1-x)}{1+rx}\right)^{-1}=(1+rx c(x;r), xc(x;r)).$$ Then the row sums of this matrix are given by $$\frac{1+ rx c(x;r)}{1-x c(x;r)}=c(x;r).$$ \end{proof} We note that the production matrix of the Riordan array $\left(\frac{1}{1+rx}, \frac{x(1-x)}{1+rx}\right)^{-1}$ begins $$\left( \begin{array}{cccccc} r & 1 & 0 & 0 & 0 & 0 \\ r & r+1 & 1 & 0 & 0 & 0 \\ r & r+1 & r+1 & 1 & 0 & 0 \\ r & r+1 & r+1 & r+1 & 1 & 0 \\ r & r+1 & r+1 & r+1 & r+1 & 1 \\ r & r+1 & r+1 & r+1 & r+1 & r+1 \\ \end{array} \right).$$ The first column elements of $\left(\frac{1}{1+rx}, \frac{x(1-x)}{1+rx}\right)^{-1}$ are of interest. We have seen that their generating function is $1+rx c(x;r)$. We can express this generating function as a continued fraction. We have the following result. \begin{proposition} The generating function $1+rxc(x;r)$ is equal to the following continued fraction. $$\cfrac{1}{1-rx- \cfrac{rx^2}{1-(r+2)x- \cfrac{(r+1)x^2}{1-(r+2)x- \cfrac{(r+1)x^2}{1-(r+2)x-\cdots}}}}.$$ \end{proposition} \begin{proof} We solve the equation $$u=\frac{1}{1-(r+2)x-(r+1)x^2 u},$$ and then we calculate the generating function $$\frac{1}{1-rx-rx^2 u}.$$ This is found to be equal to $1+rxc(x;r)$. \end{proof} This proposition says that the initial column of $\left(\frac{1}{1+rx}, \frac{x(1-x)}{1+rx}\right)^{-1}$ is the moment family for a family of orthogonal polynomials. In fact, we have the following result. \begin{proposition} The initial column of $\left(\frac{1}{1+rx}, \frac{x(1-x)}{1+rx}\right)^{-1}$ is the moment sequence for a family of orthogonal polynomials whose coefficient array is given by $$\left(\frac{(1+x)^2}{1+(r+2)x+(r+1)x^2}, \frac{x}{1+(r+2)x+(r+1)x^2}\right).$$ \end{proposition}. \begin{proof} This follows since we have the following equality of Riordan arrays. $$\left(\frac{1}{1+rx}, \frac{x(1-x)}{1+rx}\right)^{-1}\cdot \left(1, \frac{x}{1-x}\right)$$ $$=\left(\frac{(1+x)^2}{1+(r+2)x+(r+1)x^2}, \frac{x}{1+(r+2)x+(r+1)x^2}\right)^{-1}.$$ \end{proof} The production matrix for this last Riordan array begins $$\left( \begin{array}{ccccccc} r & 1 & 0 & 0 & 0 & 0 & 0 \\ r & r+2 & 1 & 0 & 0 & 0 & 0 \\ 0 & r+1 & r+2 & 1 & 0 & 0 & 0 \\ 0 & 0 & r+1 & r+2 & 1 & 0 & 0 \\ 0 & 0 & 0 & r+1 & r+2 & 1 & 0 \\ 0 & 0 & 0 & 0 & r+1 & r+2 & 1 \\ 0 & 0 & 0 & 0 & 0 & r+1 & r+2 \\ \end{array} \right).$$ The initial column sequence with generating function $1+r x c(x;r)$ has general element $$r \sum_{k=0}^{n-1} \binom{n+k-1}{2k} r^{n-k-1} C_k=\sum_{k=0}^{n-1} \binom{n+k-1}{2k} r^{n-k} C_k.$$ \begin{corollary} The Hankel transform of the initial column sequence with g.f. $1+r xc(x;r)$ is given by $$h_n=r^n (r+1)^{\binom{n}{2}}.$$ \end{corollary} \section{Generalizations} We have seen that the generating function of $C_n(r)$ is given by $$c(x;r)=\left(\frac{1}{1+rx}, \frac{x(1-x)}{1+rx}\right)^{-1}\cdot \frac{1}{1-x}.$$ A natural generalization is to consider the generating function $$c(x;r,s,y)=\left(\frac{1}{1+rx}, \frac{x(1-sx)}{1+rx}\right)^{-1}\cdot \frac{1}{1-yx}.$$ We find that $$c(x;r,s,y)=\frac{2s+r-y-rx(y+r)-(y+r)\sqrt{1-2x(r+2s)+r^2x^2}}{2(xy(y+r)-y+s)}.$$ This expands to give the sequence that begins $$1, y + r, (y + r)(y + r + s), (y + r)(y^2 + 2y(r + s) + r^2 + 3rs + 2s^2),\ldots.$$ The generating function can be expressed as $$c(x;r,s,y)=\frac{-(r+s)}{rx(y+r)+y-r-2s}c\left(\frac{(r+s)(x(y+r)-y+s)}{(rx(y+r)+y-r-2s)^2}\right),$$ which exhibits a link to the standard Catalan numbers $C_n$. Using Lagrange inversion to find the general term of the inverse Riordan array $\left(\frac{1}{1+rx}, \frac{x(1-sx)}{1+rx}\right)^{-1}$, we find that \begin{scriptsize} $$C_n(r,s,y)=\sum_{k=0}^n \left(\frac{k+0^{n+k}}{n+0^n}\sum_{i=0}^n \binom{n}{i}\binom{2n-k-i-1}{n-k-i}r^i s^{n-k-i}+\frac{r(k+1)}{n+0^n}\sum_{i=0}^n \binom{n}{i}\binom{2n-k-i-2}{n-k-i-1}r^i s^{n-k-i-1}\right)y^k,$$ \end{scriptsize} where we have used the notation $C_n(r,s,y)$ to denote the generalized Catalan numbers with generating function $c(x;r,s,y)$. Note that when $y=0$ (and thus we are considering the first column of $\left(\frac{1}{1+rx}, \frac{x(1-sx)}{1+rx}\right)^{-1}$) we have \begin{align}C_n(r,s,0)&=0^n+\frac{r}{n+0^n} \sum_{i=0}^n \binom{n}{i}\binom{2n-i-2}{n-i-1}r^i s^{n-i-1}\\&=0^n+\sum_{k=0}^{n-1} \binom{n+k-1}{2k}r^{n-k}s^k C_k\\&=\sum_{k=0}^n \binom{n+k-1}{2k}r^{n-k}s^kC_k.\end{align} \begin{example} The sequence $C_n(2,3,0)=\sum_{k=0}^n \binom{n+k-1}{2k}2^{n-k}3^kC_k$ begins $$1, 2, 10, 80, 790, 8720, 103060, 1275680,\ldots.$$ This is \seqnum{A152600}. Its Hankel transform is given by $$h_n=6^n 15^{\binom{n}{2}}.$$ \end{example} We have the following result. \begin{proposition} The sequence $C_n(r,s,y)$ with generating function $c(x;r,s,y)$ is the moment sequence for the family of orthogonal polynomials that have coefficient array given by the Riordan array $$\left(\frac{1+(2s-y)x+s(s-y)x^2}{1+(r+2s)x+s(r+s)x^2}, \frac{x}{1+(r+2s)x+s(r+s)x^2}\right).$$ \end{proposition} \begin{corollary} The Hankel transform of the generalized Catalan numbers with generating function $c(x;r,s,y)$ is given by $$h_n=(s(y+r))^n (s(r+s))^{\binom{n}{2}}.$$ \end{corollary} \begin{proof} This follows since we can show that the generating function $c(x;r,s,y)$ is expressible as the Jacobi continued fraction $$\cfrac{1}{1-(r+y)x- \cfrac{s(r+y)x^2}{1-(r+2s)x- \cfrac{s(r+s)x^2}{1-(r+2s)x- \cfrac{s(r+s)x^2}{1-\cdots}}}}.$$ \end{proof} \begin{corollary} The generating function $c(x;r,s,y)$ can be represented as the Stieltjes continued fraction $$\cfrac{1}{1- \cfrac{(r+y)x}{1- \cfrac{sx}{1- \cfrac{(r+s)x}{1- \cfrac{sx}{1- \cfrac{(r+s)x}{1-\cdots}}}}}}.$$ \end{corollary} \begin{example} We consider the generating function $c(x; 2,1,-1)$. Thus we have that $c(x;2,1,-1)$ is equal to $$\cfrac{1}{1- \cfrac{x}{1- \cfrac{x}{1- \cfrac{3x}{1- \cfrac{x}{1- \cfrac{3x}{1- \cfrac{x}{1-\cdots}}}}}}},$$ or equivalently $$\cfrac{1}{1-x- \cfrac{x^2}{1-4x- \cfrac{3x^2}{1-4x- \cfrac{3x^2}{1-4x-\cdots}}}}.$$ This generating function expands to give the sequence that begins $$1, 1, 2, 7, 32, 166, 926,\ldots.$$ The sequence $1,2,7,32,166,\ldots$ is \seqnum{A108524} and it counts the number of ordered rooted trees with $n$ generators. Alternatively it counts the number of Schroeder paths of semi-length $n-1$ in which the level steps that are not on the horizontal axis come in $2$ colors (Deutsch). This latter sequence has generating function $$\cfrac{1}{1-x- \cfrac{x}{1-2x- \cfrac{x}{1-2x- \cdots}}}.$$ \end{example} \begin{proposition} The generating function $c(x;r,s,y)$ is equal to the continued fraction $$\cfrac{1}{1-\frac{r(r+y)}{r+s} x- \cfrac{\frac{s(r+y)}{r+s}x}{1-rx- \cfrac{sx}{1-rx- \cfrac{sx}{1-rx-\cdots}}}}.$$ \end{proposition} \begin{proof} We let $$v=\frac{1}{1-rx-sx v}.$$ Then the generating function defined by the continued fraction is given by $$\frac{1}{1-\frac{r(r+y)}{r+s} x-\frac{s(r+y)}{r+s}x v}.$$ This simplifies to give $c(x;r,s,y)$. \end{proof} \begin{example} The generating function $c(x;1,2,3)$ expands to give the sequence that begins $$1, 4, 24, 168, 1272, 10104, 82920, 696840,\ldots.$$ This sequence thus has generating function $$\cfrac{1}{1-\frac{4}{3}x- \cfrac{\frac{8}{3}x}{1-x- \cfrac{2x}{1-x- \cfrac{2x}{1-x-\cdots}}}}.$$ \end{example} \begin{example} The generating function $c(x;2,2,0)$ expands to give the sequence that begins $$1, 2, 8, 48, 352, 2880, 25216, 231168,\ldots.$$ This sequence thus has generating function $$\cfrac{1}{1- \cfrac{2x}{1- \cfrac{2x}{1- \cfrac{4x}{1- \cfrac{2x}{1- \cfrac{4x}{1-\cdots}}}}}},$$ or $$\cfrac{1}{1-x- \cfrac{x}{1-2x- \cfrac{2x}{1-2x- \cfrac{2x}{1-2x-\cdots}}}}.$$ Equivalently, this is equal to $$\cfrac{1}{1-2x- \cfrac{4x^2}{1-6x- \cfrac{8x^2}{1-6x- \cfrac{8x^2}{1-6x-\cdots}}}}.$$ The sequence $1,1,2,8,48,352,\ldots$ is \seqnum{A054726}, which counts the number of ways of drawing non-crossing chords between $n$ points on a circle. The generating function of this sequence can be expressed as the continued fractions $$\cfrac{1}{1-x- \cfrac{x^2}{1-5x- \cfrac{8x^2}{1-6x- \cfrac{8x^2}{1-6x-\cdots}}}},$$ $$\cfrac{1}{1- \cfrac{x}{1- \cfrac{2x}{1-2x- \cfrac{2x}{1-2x-\cdots}}}},$$ or $$\cfrac{1}{1- \cfrac{x}{1- \cfrac{x}{1- \cfrac{4x}{1- \cfrac{2x}{1- \cfrac{4x}{1- \cfrac{2x}{1-\cdots}}}}}}}.$$ \end{example} \begin{corollary} We have \begin{equation}C_n(r,s,s)=\sum_{k=0}^n \frac{1}{n-k+1} \binom{2n-k}{n}\binom{n}{k} s^{n-k}r^k.\end{equation} \end{corollary} \begin{proof} The number triangle $\frac{1}{n-k+1} \binom{2n-k}{n}\binom{n}{k}$ \seqnum{A060693} is equal to $$[1,1,1,\ldots ]\,\Delta \,[1,0,1,0,\ldots].$$ This begins $$\left( \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 \\ 2 & 3 & 1 & 0 & 0 & 0 \\ 5 & 10 & 6 & 1 & 0 & 0 \\ 14 & 35 & 30 & 10 & 1 & 0 \\ 42 & 126 & 140 & 70 & 15 & 1 \\ \end{array} \right).$$ Then $\frac{1}{n-k+1} \binom{2n-k}{n}\binom{n}{k} s^{n-k}r^k$ corresponds to $$[s,s,s,\ldots ]\,\Delta \,[r,0,r,0,\ldots],$$ or the generating function $$\cfrac{1}{1- \cfrac{(s+r)x}{1- \cfrac{sx}{1- \cfrac{(s+r)x}{1- \cfrac{sx}{1-\cdots}}}}}. $$ This is $c(x;r,s,s)$. \end{proof} Equivalently, we have \begin{equation}C_n(r,s,s)=\sum_{k=0}^n \frac{1}{k+1}\binom{n+k}{n}\binom{n}{k}r^{n-k}s^k,\end{equation} where the matrix $(\frac{1}{k+1}\binom{n+k}{n}\binom{n}{k})$ is \seqnum{A088617} which counts Schroeder paths of semi-length $n$ with $k$ up steps. \begin{corollary} We have \begin{equation}C_n(r,s,s)=\sum_{k=0}^n N_{n,k}(r+s)^k s^{n-k}.\end{equation} \end{corollary} \begin{proof} This follows from the continued fraction expression above. \end{proof} \begin{corollary} We have that $C_n(r,s,s)=\sum_{k=0}^{n}\binom{n+k}{2k}r^{n-k}s^kC_k$ is the moment sequence for the family of orthogonal polynomials with coefficient matrix given by the Riordan array $$\left(\frac{1+sx}{1+(r+2s)x+s(r+s)x^2}, \frac{x}{1+(r+2s)x+s(r+s)x^2}\right).$$ \end{corollary} In similar fashion, we can establish the following with regard to $C_n(r,s,s)=[x^n]c(x;r,s,s)$. We have $$c(x;r,s,s)=\frac{1}{1-rx}c\left(\frac{sx}{(1-rx)^2}\right)=\frac{1-rx-\sqrt{1-2x(r+2s)+r^2x^2}}{2sx}=\frac{1}{x}\text{Rev} \frac{x(1-sx)}{1+rx}.$$ We also have that $C_n(r,s,s)$ are the row sums of the Riordan array $$\left(\frac{1-x(s+1)}{(1-x)(1+(r-1)x)}, \frac{x(1-x(s+1))}{(1-x)(1+(r-1)x)}\right)^{-1}.$$ Equivalently, $$c(x;r,s,s)=\left(\frac{1-x(s+1)}{(1-x)(1+(r-1)x)}, \frac{x(1-x(s+1))}{(1-x)(1+(r-1)x)}\right)^{-1}\cdot \frac{1}{1-x}.$$ The numbers $C_n(r,s,s)$ count Schroeder paths of semi-length $n$ with $r$ possible colors for the level steps and $s$ possible colors for the up steps \cite{Petreolle}. For instance, \seqnum{A156017} is the sequence that begins $$1, 4, 24, 176, 1440, 12608, 115584, 1095424, 10646016,\ldots$$ with general term $$\sum_{k=0}^n \binom{n+k}{2k}2^{n-k}2^k=\sum_{k=0}^n N_{n,k}2^{n+k}=2^n S_n,$$ which counts Schroeder paths of semi-length $n$ with $2$ possible colors for the level steps and $2$ possible colors for the up steps. Its generating function can by represented as the continued fraction $$\cfrac{1}{1-2x- \cfrac{2x}{1-2x- \cfrac{2x}{1-2x-\cdots}}}.$$ (An alternative interpretation in terms of operads can be given: the sequence counts the number of recursively defined red-white trees \cite{Chapoton}). \begin{example} The sequences $C_n(1,s,s)=\sum_{k=0}^n \binom{n+k}{2k}s^k C_k$ count Schroeder paths of semi-length $n$ where the up steps can have $s$ colors. For $s=1 \ldots 4$ we obtain sequences \seqnum{A006318}, \seqnum{A103210}, \seqnum{A103211}, and \seqnum{A133305}, which begin respectively, $$1, 2, 6, 22, 90, 394, 1806,\ldots,$$ $$1, 3, 15, 93, 645, 4791, 37275,\ldots,$$ $$1, 4, 28, 244, 2380, 24868, 272188,\ldots,$$ and $$1, 5, 45, 505, 6345, 85405, 1204245,\ldots.$$ The sequence $1,5,45, \ldots$ then has generating function $$\cfrac{1}{1- \cfrac{5x}{1- \cfrac{4x}{1- \cfrac{5x}{1- \cfrac{4x}{1-\cdots}}}}},$$ or equivalently $$\cfrac{1}{1-5x- \cfrac{20x^2}{1-9x- \cfrac{20x^2}{1-9x-\cdots}}}.$$ These sequences also count the first homogeneous components of the operad $\mathbf{\mathbf{As}}(\mathcal{Q})$ \cite{Giraudo}, where $\mathcal{Q}$ is the trivial poset on the set $[s+1]$, and $\mathbf{As}$ is a functor from the category of finite posets to the category of nonsymmetric binary and quadratic operads defined in \cite{Giraudo}. \end{example} \begin{figure} \begin{center} \begin{tikzpicture}[scale=0.7] \draw[help lines] (0,0) grid (20,16); \draw[color=blue, ultra thick] (0,0)--(2,2); \draw[ultra thick] (2,2)--(4,0); \draw[color=red, ultra thick] (5,0)--(7,2)--(9,0); \draw[color=blue, ultra thick] (10,0)--(11,1); \draw[color=red, ultra thick] (11,1)--(12,2); \draw[ultra thick] (12,2)--(14,0); \draw[color=red, ultra thick] (15,0)--(16,1); \draw[color=blue, ultra thick] (16,1)--(17,2); \draw[ ultra thick] (17,2)--(19,0); \draw[color=blue, ultra thick] (0,3)--(1,4); \draw[ultra thick] (1,4)--(3,4)--(4,3); \draw[color=red, ultra thick] (5,3)--(6,4); \draw[ultra thick] (6,4)--(8,4)--(9,3); \draw[color=blue,ultra thick] (0,6)--(1,7); \draw[ultra thick] (1,7)--(2,6); \draw[color=blue,ultra thick] (2,6)--(3,7); \draw[ultra thick] (3,7)--(4,6); \draw[color=red,ultra thick] (5,6)--(6,7); \draw[ultra thick] (6,7)--(7,6); \draw[color=red, ultra thick] (7,6)--(8,7); \draw[ultra thick] (8,7)--(9,6); \draw[color=blue,ultra thick] (10,6)--(11,7); \draw[ultra thick] (11,7)--(12,6); \draw[color=red, ultra thick] (12,6)--(13,7); \draw[ultra thick] (13,7)--(14,6); \draw[color=red, ultra thick] (15,6)--(16,7); \draw[ultra thick] (16,7)--(17,6); \draw[color=blue, ultra thick] (17,6)--(18,7); \draw[ultra thick] (18,7)--(19,6); \draw[color=blue, ultra thick] (0,9)--(1,10); \draw[ultra thick] (1,10)--(2,9)--(4,9); \draw[color=red, ultra thick] (5,9)--(6,10); \draw[ultra thick] (6,10)--(7,9)--(9,9); \draw[ultra thick] (0,12)--(2,12); \draw[color=blue, ultra thick] (2,12)--(3,13); \draw[ultra thick] (3,13)--(4,12); \draw[ultra thick] (5,12)--(7,12); \draw[color=red, ultra thick] (7,12)--(8,13); \draw[ultra thick] (8,13)--(9,12); \draw[ultra thick] (0,15)--(4,15); \end{tikzpicture} \caption{The $15$ Schroeder paths of semi-length $2$ with $2$ up-colors}\label{Schroeder} \end{center} \end{figure} \begin{proposition} The generating function $c(x;r,s,s)$ can be expressed as the continued fraction $$\cfrac{1}{1-rx- \cfrac{sx}{1-rx- \cfrac{sx}{1-rx-\cdots}}}.$$ \end{proposition} \begin{proof} We have $$c(x;r,s,y)=\frac{2s+r-y-rx(y+r)-(y+r)\sqrt{1-2x(r+2s)+r^2x^2}}{2(xy(y+r)-y+s)}.$$ Thus $$c(x;r,s,s)=\frac{1-rx-\sqrt{1-2(r+2s)x+r^2x^2}}{2sx}.$$ Solving the equation $$u=\frac{1}{1-rx-sx u}$$ shows that $u(x)=c(x;r,s,s)$. \end{proof} This type of continued fraction is a $T$-fraction, or Thron-fraction \cite{Petreolle, Roblet}. We have the following integral representation for the moments $C_n(r,s,s)$. \begin{proposition} We have $$C_n(r,s,s)=\frac{1}{2\pi} \int_{r+2s-2\sqrt{s(r+s)}}^{r+2s+2\sqrt{s(r+s)}} x^n \frac{\sqrt{-x^2+2x(r+2s)-r^2}}{x}\, dx.$$ \end{proposition} \begin{proof} We apply the Stieltjes-Perron transform to the generating function $c(x;r,s,s)$. \end{proof} \begin{example} The sequence $C_n(2,3,3)=\sum_{k=0}^n \binom{n+k}{2k}C_k 2^{n-k}3^k=\sum_{k=0}^n N_{n,k}5^k 3^{n-k}$ \seqnum{A152601}, which begins $$1, 5, 40, 395, 4360, 51530, 637840, 8163095,\ldots,$$ has integral representation $$C_n(2,3,3)=\frac{1}{2\pi} \int_{8-2 \sqrt{15}}^{8+2 \sqrt{15}} x^n \frac{\sqrt{4(4x-1)-x^2}}{3x}\,dx.$$ The generating function of this sequence can be represented as the continued fraction $$\cfrac{1}{1- \cfrac{5x}{1- \cfrac{3x}{1- \cfrac{5x}{1- \cfrac{3x}{1-\cdots}}}}}.$$ \end{example} We end this section by gathering all the expressions for the generalized Catalan numbers $C_n(r,s,s)$. We have \begin{align*} C_n(r,s,s)&=\sum_{k=0}^n N_{n,k}(r+s)^k s^{n-k}\\ &=\sum_{k=0}^n N_{n,k}^{\text{rev}}(r+s)^{n-k} s^k\\ &=\sum_{k=0}^n \binom{n+k}{2k}C_k r^{n-k}s^k\\ &=\sum_{k=0}^n \binom{2n-k}{k}C_{n-k}r^k s^{n-k}\\ &=\sum_{k=0}^n \frac{1}{k+1}\binom{n+k}{n}\binom{n}{k}r^{n-k}s^k\\ &=\sum_{k=0}^n \frac{1}{n-k+1} \binom{2n-k}{n}\binom{n}{k}r^k s^{n-k}\\ &=\frac{1}{n+1} \sum_{k=0}^n \binom{n-1}{k}\binom{2n-k}{n}(r+s)^{n-k}(-s)^k \\ &=\frac{1}{n+1} \sum_{k=0}^n \binom{n-1}{n-k}\binom{n+k}{k}(r+s)^k (-s)^{n-k}.\end{align*} For instance, the coefficient array for the last equality begins $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 2 & 0 & 0 & 0 & 0 \\ 0 & 1 & 5 & 5 & 0 & 0 & 0 \\ 0 & 1 & 9 & 21 & 14 & 0 & 0 \\ 0 & 1 & 14 & 56 & 84 & 42 & 0 \\ 0 & 1 & 20 & 120 & 300 & 330 & 132 \\ \end{array} \right).$$ This is \seqnum{A086810}. The coefficient triangle $N_{n,k}^{\text{rev}}$ is the reversal of the Narayana triangle $N_{n,k}$. We have $${N^{\text{rev}}}_{n,k}=0^{n+k}+\frac{n-k}{(n+0^n)(k+1)}\binom{n}{k}^2.$$ This is the triangle \seqnum{A131198}, which in the Del\'eham notation is $$[1,0,1,0,1,0,\ldots]\,\Delta\, [0,1,0,1,0,\ldots].$$ \begin{example} We have $$\sum_{k=0}^n \binom{n+k}{2k}(s+1)^{n-k}(s-1)^k=\sum_{k=0}^n N_{n,k}(2s)^k (s-1)^{n-k}.$$ For $s=2$, we get the sequence $\sum_{k=0}^n \binom{n+k}{2k}C_k3^{n-k}=\sum_{k=0}^n N_{n,k}4^k$ which begins $$ 1, 4 , 20, 116, 740, 5028, 35700, 261780, 1967300,\ldots.$$ This is \seqnum{A082298}, which counts Schroeder paths of semi-length $n$ in which the level steps can have any of $3$ colors. For $s=3$, we obtain the sequence $$\sum_{k=0}^n \binom{n+k}{2k}C_k4^{n-k}2^k=\sum_{k=0}^n N_{n,k}6^k2^{n-k}$$ which begins $$1, 6, 48, 456, 4800, 53952, 634368,\ldots.$$ This sequence counts Schroeder paths of semi-length $n$ in which the level steps can have any of $4$ colors and the up steps have $2$ colors. \end{example} We have remarked that $$c(x;r,s,s)=\frac{1}{x} \text{Rev}\left(\frac{x(1-sx)}{1+rx}\right).$$ This suggests the following generalization. We define $\check{c}(x;r,s,t)$ to be the generating function $$\check{c}(x;r,s,t)=\frac{1}{x}\text{Rev}\left(\frac{x(1-sx)}{1+rx+tx^2}\right).$$ We then define the sequence $\check{C}_n(r,s,t)=[x^n]\check{c}(x;r,s,t)$. This sequence begins $$1, r + s, r^2 + 3rs + 2s^2 + t, r^3 + 6r^2s + r(10s^2 + 3t) + s(5s^2 + 4t),\ldots.$$ We have $$[x^n]\text{Rev}\left(\frac{x(1-sx)}{1+rx+tx^2}\right)=\frac{1}{n}[x^{n-1}]\left(\frac{1+r x+tx^2}{1-sx}\right)^n,$$ which gives us the following expression for $\check{C}_n(r,s,t)$. \begin{proposition} We have $$\check{c}(x;r,s,t)=\frac{1-rx-\sqrt{1-2(r+2s)x+(r^2-4t)x^2}}{2(s+tx)},$$ and \begin{equation}\check{C}_n(r,s,t)=\frac{1}{n+1} \sum_{k=0}^{n+1} \binom{n+1}{k}\sum_{j=0}^k \binom{k}{j}\binom{2n-k-j}{n-k-j}t^j r^{k-j} s^{n-k-j}.\end{equation} \end{proposition} \begin{corollary} We have $$\check{c}(x;r,s,t)=\frac{1}{1-rx}c\left(\frac{x(s+tx)}{(1-rx)^2}\right),$$ and \begin{equation}\check{C}_n(r,s,t)=\sum_{k=0}^n \sum_{j=0}^k \binom{k}{j}\binom{n+k-j}{n-k-j}r^{n-k-j}t^j s^{k-j}C_k.\end{equation} \end{corollary} \begin{proof} The equality of the two expressions for the generating function can be seen by expansion of the latter expression. We then use the expression for the general element of the Riordan array $\left(\frac{1}{1-rx}, \frac{x(s+tx)}{(1-rx)^2}\right)$ to obtain the second expression for $\check{C}_n(r,s,t)$. \end{proof} An immediate consequence of this corollary is that we have the following continued fraction expression for the generating function $\check{c}(x;r,s,t)$. $$ \cfrac{1}{1-rx- \cfrac{x(s+tx)}{1-rx- \cfrac{x(s+tx)}{1-rx-\cdots}}}.$$ \begin{proposition} The generating function $\check{c}(x;r,s,t)$ of the generalized Catalan numbers $\check{C}_n(r,s,t)$ can be expressed as the Jacobi continued fraction $$\cfrac{1}{1-(r+s)x- \cfrac{(s(r+s)+t)x^2}{1-(r+2s)x- \cfrac{(s(r+s)+t)x^2}{1-(r+2s)x-\cdots}}}.$$ \end{proposition} \begin{proof} We solve the equation $$u=\frac{1}{1-(r+2s)x-(s(r+s)+t)x^2u},$$ and then we verify that $\check{c}(x;r,s,t)=\frac{1}{1-(r+s)x-(s(r+s)+t)x^2 u}$. \end{proof} \begin{corollary} The Hankel transform of the generalized Catalan numbers $\check{C}_n(r,s,t)$ is given by $$h_n=(s(r+s)+t)^{\binom{n+1}{2}}.$$ \end{corollary} \begin{proposition} The sequence $\check{C}_n(r,s,t)$ is the moment sequence of the family of orthogonal polynomials whose coefficient array is given by the Riordan array $$\left(\frac{1-sx}{1+(r+2s)x+(t+s(r+s))x^2}, \frac{x}{1+(r+2s)x+(t+s(r+s))x^2}\right).$$ \end{proposition} \begin{proof} Using the theory of Riordan arrays, it is direct to show that the initial column of the inverse matrix has generating function given by $\check{c}(x;r,s,t)$. By its form, the above Riordan array is the coefficient array of a family of orthogonal polynomials. \end{proof} We can use the generating function and the Stieltjes-Perron transform to find an integral representation of this moment sequence. \begin{proposition} We have the following integral representation for the sequence $\check{C}_n(r,s,t)$. $$\check{C}_n(r,s,t)=\frac{1}{\pi}\int_{r+2s-2\sqrt{t+s(r+s)}}^{r+2s+2\sqrt{t+s(r+s)}} x^n\,\frac{\sqrt{-x^2+2(r+2s)x-r^2+4t}}{2(sx+t)}\,dx.$$ \end{proposition} \begin{example} We have $$\check{C}_n(1,1,1)=\frac{1}{\pi}\int_{3-2\sqrt{3}}^{2+2\sqrt{3}} x^n\, \frac{\sqrt{3(2x+1)-x^2}}{2(x+1)}\,dx.$$ This sequence \seqnum{A064641} begins $$1, 2, 7, 29, 133, 650, 3319, 17498, 94525,\ldots.$$ We have $$\check{C}_n(2,2,1)=\frac{1}{\pi}\int_0^{12} x^n\,\frac{\sqrt{x(12-x)}}{2(2x+1)}\,dx.$$ This sequence \seqnum{A064063}$(n+1)$ begins $$1, 4, 25, 190, 1606, 14506, 137089, 1338790, 13403950,\ldots.$$ \end{example} We have $$C_n(r,s,s)=\check{C}_n(r,s,0).$$ The numbers $$\check{C}_n(r,0,t)=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k}C_k r^{n-2k}t^k$$ count Motzkin paths where the level steps have $r$ colors and the up steps have $t$ colors. \section{The generalized Catalan numbers $\tilde{C}_n(r,s,y)$.} In this section, we consider the generalized Catalan numbers $\tilde{C}_n(r,s,y)$ whose generating function is given by $$\left(\frac{1-x(s+1)}{(1-x)(1+(r-1)x)}, \frac{x(1-x(s+1))}{(1-x)(1+(r-1)x)}\right)^{-1}\cdot \frac{1}{1-yx}.$$ These generalized Catalan numbers are the moments for the family of orthogonal polynomials whose coefficient matrix is given by $$\left(\frac{1+(1+s-y)x}{1+(r+2s)x+s(r+s)x^2}, \frac{x}{1+(r+2s)x+s(r+s)x^2}\right).$$ Their generating function can be expressed as the Jacobi continued fraction $$\mathcal{J}(y+r+s-1,r+2s,r+2s,\ldots;s(r+s),s(r+s),\ldots).$$ When $y=s+1$, we obtain the generating function $$\mathcal{J}(r+2s,r+2s,r+2s,\ldots;s(r+s),s(r+s),\ldots),$$ or $u(x)$ where $$u(x)=\frac{1}{1+(r+2s)x+s(r+s)x^2u}.$$ This gives us $$u(x)=\frac{1-(r+2s)x-\sqrt{1-2(r+2s)x+r^2x^2}}{2sx^2(r+s)}=\frac{1}{1-(r+2s)x}c\left(\frac{x^2 s(r+s)}{(1-(r+2s)x)^2}\right).$$ From this we deduce that the generalized Catalan numbers of this section, for $y=s+1$, are given by \begin{align}\tilde{C}_n(r,s,s+1)&=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k}(r+2s)^{n-2k}(s(r+s))^k C_k\\&=\sum_{k=0}^n \binom{n+1}{k}\binom{2n-k+2}{n-k}s^{n-k}r^k.\end{align} Note that when both $r+2s=1$ and $s(r+s)=1$, we obtain the Motzkin numbers. This occurs when $$r=1-2s \quad \text{and}\quad s=\frac{1 \pm i\sqrt{3}}{2}.$$ For instance, we have $\tilde{C}_n(\sqrt{3}i, \frac{1}{2}-\frac{\sqrt{3}i}{2},\frac{3}{2}-\frac{\sqrt{3}i}{2})=M_n$. We have the integral representation $$\tilde{C}(r,s,s+1)=\frac{1}{\pi} \int_{r+2s-2\sqrt{s(r+s)}}^{r+2s+2\sqrt{s(r+s))}} x^n \frac{\sqrt{-x^2+2(r+2s)x-r^2}}{2s(r+s)}\,dx.$$ \begin{example} The generalized Catalan sequence $\tilde{C}_n(2,3,4)$, which begins $$1, 8, 79, 872, 10306, 127568, 1632619,\ldots$$ is given by $$\tilde{C}(2,3,4)=\frac{1}{\pi} \int_{8-2\sqrt{15}}^{8+\sqrt{15}} x^n \frac{\sqrt{4(4x-1)-x^2}}{30}\,dx.$$ \end{example} In the general case of $\tilde{C}_n(r,s,y)$, we see that its generating function will be given by $$\frac{1}{1-(y+r+s-1)x-s(r+s)x^2 u(x)}=\frac{2}{1-(2y+r-2)x+\sqrt{1-2(r+2s)x+r^2 x^2}}.$$ This may be expressed as $$\frac{1}{1-(r+2y-2)x}c\left(\frac{x(1+s-y+(1-r+(r-2)y+y^2)x)}{(1-(r+2y-2)x)^2}\right).$$ Using the Stieltjes-Perron transform, we find that $$\tilde{C}_n(r,s,y)=\frac{1}{\pi}\int_{r+2s-2\sqrt{s(r+s)}}^{r+2s+2\sqrt{s(r+s)}} x^n \frac{\sqrt{-x^2+2(r+2s)x-r^2}}{2(1-r+y(r-2)+y^2+(1+s-y)x)}\,dx.$$ \begin{example} We consider the case of $(r,s,y)=(1,2,3)$. Then $\tilde{C}_n(1,2,3)$ is \seqnum{A269730} which begins $$1, 5, 31, 215, 1597, 12425, 99955, 824675, 6939769,\ldots.$$ Then $$\tilde{C}_n(1,2,3)=\frac{1}{\pi} \int_{5-2\sqrt{6}}^{5+2\sqrt{6}} x^n \frac{-x^2+10x-1}{12}\,dx.$$ Other expressions for $\tilde{C}_n(1,2,3)$ are given by $$\tilde{C}_n(1,2,3)=\sum_{k=0}^n \frac{1}{k+1}\binom{n}{k}\binom{n+k+2}{k}2^k=\sum_{k=0}^n \tilde{N}_{n,k}2^{n-k}3^k,$$ where $\tilde{N}_{n,k}=\frac{1}{k+1}\binom{n}{k}\binom{n+1}{k}$ are the (palindromic) Narayana numbers, and the coefficient array $(\frac{1}{k+1}\binom{n}{k}\binom{n+k+2}{k})$ is \seqnum{A033282}, which gives the number of diagonal dissections of a convex $n$-gon into $k+1$ regions. In this case, the sequence $\tilde{C}_n(1,2,3)$ or \seqnum{A269730} gives the dimensions of the $2$-polytridendriform operad ${\rm TDendr}_2$ \cite{Giraudo_2}. We note that the generating function of this sequence is $f(-x)$, where $$f(x)=\frac{1}{x} \text{Rev} \left(\frac{1}{1-3x}-\frac{1}{1-2x}\right),$$ (remark by Gheorghe Coserea). In terms of Riordan arrays, the generating function for this sequence is simply given by $$\left(\frac{1}{1-5x}, \frac{6x^2}{(1-5x)^2}\right)\cdot c(x).$$ Thus we have $$\tilde{C}_n(1,2,3)=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k}5^{n-2k}6^kC_k=\sum_{k=0}^n \tilde{N}_{n,k}2^k 3^{n-k}.$$ \end{example} \begin{example} We now look at $(r,s,y)=(2,2,3)$. Then we find that $\tilde{C}(2,2,3)$, which begins $$1, 6, 44, 360, 3152, 28896, 273856, 2661504, 26380544, \ldots$$ is \seqnum{A090442}. We have $$\tilde{C}(2,2,3)=\frac{1}{\pi} \int_{6-4\sqrt{2}}^{6+4\sqrt{2}} x^n \frac{\sqrt{4(3x-1)-x^2}}{16}\,dx.$$ In terms of Riordan arrays, the generating function for this sequence is simply given by $$\left(\frac{1}{1-6x}, \frac{8x^2}{(1-6x)^2}\right)\cdot c(x).$$ Thus we have $$\tilde{C}_n(2,2,3)=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k}6^{n-2k}8^kC_k=\sum_{k=0}^n \tilde{N}_{n,k}2^k 4^{n-k}.$$ This sequence gives the row sums of the scaling \seqnum{A090452} of the $\{3,2\}$-Stirling$2$ array \seqnum{A078740}. \end{example} \begin{example} We have that $\tilde{C}_n(-1,4,5)=\tilde{C}_n(1,3,4)$. This sequence begins $$1, 7, 61, 595, 6217, 68047, 770149,\ldots$$ with generating function $$\left(\frac{1}{1-7x}, \frac{12x^2}{(1-7x)^2}\right)\cdot c(x),$$ and hence the general term is given by $$\tilde{C}_n(1,3,4)=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k}7^{n-2k}12^kC_k=\sum_{k=0}^n \tilde{N}_{n,k}3^k 4^{n-k}.$$ This sequence is \seqnum{A269731}, which gives the dimensions of the $3$-polytridendriform operad ${\rm TDendr}_3$ \cite{Giraudo_2}. We note that the generating function of this sequence is $f(-x)$, where $$f(x)=\frac{1}{x} \text{Rev} \left(\frac{1}{1-4x}-\frac{1}{1-3x}\right).$$ \end{example} \begin{lemma} We have $$\frac{1}{x} \text{Rev}\left(\frac{1}{1+rx}-\frac{1}{1+(r+1)x}\right)=\left(\frac{1}{1-(2r+1)x}, \frac{x^2 r(r+1)}{(1-(2r+1)x)^2}\right)\cdot c(x).$$ \end{lemma} It follows that \begin{align*}[x^n]\frac{1}{x} \text{Rev}\left(\frac{1}{1+rx}-\frac{1}{1+(r+1)x}\right)&=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k}(r(r+1))^k (2r+1)^{n-2k}C_k\\&=\sum_{k=0}^n \frac{1}{k+1}\binom{n}{k}\binom{n+k+2}{k}r^k.\end{align*} More generally, we have the following. \begin{lemma} $$[x^n]\frac{1}{x}\text{Rev}\left( \frac{1}{s-r} \left(\frac{1}{1+rx}-\frac{1}{1+sx}\right)\right)=\sum_{k=0}^n \tilde{N}_{n,k}s^{n-k}r^k.$$ \end{lemma} \begin{proof} We find that $$\frac{1}{x}\text{Rev}\left( \frac{1}{s-r} \left(\frac{1}{1+rx}-\frac{1}{1+sx}\right)\right)=\frac{1}{1-(r+s)x}c\left(\frac{rs x^2}{(1-(r+s)x)^2}\right).$$ This expands to give the sequence $$\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor}\binom{n}{2k}(rs)^k(r+s)^{n-2k}C_k=\sum_{k=0}^n \tilde{N}_{n,k}s^{n-k}r^k.$$ \end{proof} We have seen that in the general case of $\tilde{C}_n(r,s,y)$, its generating function will be given by $$\frac{1}{1-(y+r+s-1)x-s(r+s)x^2 u(x)}=\frac{2}{1-(2y+r-2)x+\sqrt{1-2(r+2s)x+r^2 x^2}}.$$ This may be expressed as $$\frac{1}{1-(r+2y-2)x}c\left(\frac{x(1+s-y+(1-r+(r-2)y+y^2)x)}{(1-(r+2y-2)x)^2}\right).$$ We now let $y=s+1$. Then $\tilde{C}_n(r,s,s+1)$ will have as generating function $$\left(\frac{1}{1-(r+2s)x},\frac{x^2 s(r+s)}{(1-(r+2s)x)^2}\right)\cdot c(x),$$ which means that $$\tilde{C}_n(r,s,s+1)=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k}(s(r+s))^k (r+2s)^{n-2k}C_k=\sum_{k=0}^n \tilde{N}_{n,k}s^k (r+s)^{n-k}.$$ As a consequence, we get the following result. \begin{proposition} We have $$[x^n]\frac{1}{x}\text{Rev}\left( \frac{1}{s-r} \left(\frac{1}{1+rx}-\frac{1}{1+sx}\right)\right)=\tilde{C}_n(s-r,r,r+1).$$ \end{proposition} Thus we have $$\tilde{C}_n(s-r,r,r+1)=\sum_{k=0}^n \tilde{N}_{n,k}s^{n-k}r^k.$$ \begin{example} In this example, we begin by noting that the generating function $$\frac{1}{x}\text{Rev}\left(\frac{x}{1+rx+sx^2}\right)$$ expands to give the sequence $$\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k}C_k r^{n-2k}s^k.$$ The generating function of this sequence can be represented by the continued fraction $$\cfrac{1}{1-rx- \cfrac{sx^2}{1-rx- \cfrac{sx^2}{1-rx-\cdots}}}.$$ We now substitute $C_n(v,w,w)$ for $C_n$ into this expression. Thus we consider the sequence $\tilde{\tilde{C}}_n(r,s,v,w)$ with general term \begin{equation}\tilde{\tilde{C}}_n(r,s,v,w)=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k}C_k(v,w,w) r^{n-2k}s^k.\end{equation} This sequence depends on the four parameters $r,s,v,w$. We find that this sequence has a generating function given by $$\frac{1-rx}{1-2rx-x^2(sv-r^2)}c\left(\frac{x^2 s w(1-rx)^2}{(1-2rx-x^2(sv-r^2))^2}\right).$$ Equivalently, this is given by the continued fraction $$\cfrac{1}{1-rx- \cfrac{s(v+w)x^2}{1-rx- \cfrac{swx^2}{1-rx- \cfrac{s(v+w)x^2}{1-rx- \cfrac{swx^2}{1-rx-\cdots}}}}}.$$ We find that \begin{scriptsize} $$\tilde{\tilde{C}}_n(r,s,v,w)=\sum_{k=0}^n \sum_{j=0}^{2k+1} \binom{2k+1}{j}(-r)^j \sum_{i=0}^{n-2k-j}\binom{2k+i}{i}\binom{i}{n-2k-j-i}(sv-r^2)^{n-2k-j-i}(2r)^{2i+2k+j-n} s^k w^k C_k.$$ \end{scriptsize} The Hankel transform of this sequence is then given by $$h_n=s^{\binom{n+1}{2}}(v+w)^{\lfloor \frac{(n+1)^2}{4}\rfloor}w^{\lfloor \frac{n^2}{4} \rfloor}.$$ We note that the reversion of $$\frac{x(1-rx)}{1-2rx-x^2(sv-r^2)}c\left(\frac{x^2 s w(1-rx)^2}{(1-2rx-x^2(sv-r^2))^2}\right)$$ is given by $$\frac{1+2rx+swx^2-\sqrt{1+2sx^2(2v+w)+s^2w^2x^4}}{2(r+x(r^2-sv)+rswx^2)}$$ or equivalently by $$\frac{x}{1+2rx+swx^2}c\left(\frac{x(r+(r^2-sv)x+rswx^2)}{(1+2rx+swx^2)^2}\right).$$ This expands to give a sequence that begins $$0, 1, -r, - sv + r^2 - sw, r(2sv - r^2 + 2sw), 2s^2v^2 + 3sv(sw - r^2) + r^4 - 3r^2sw + s^2w^2\ldots.$$ When $v=0$ and $w=1$, we obtain the expansion of $$\frac{x}{1+rx+sx^2}.$$ \end{example} \section{Generalized Catalan triangles} There are many triangles associated with the Catalan numbers which have been called by the term ``Catalan triangle''. Two such matrices are the Riordan arrays $$(1, xc(x)) \quad \text{and}\quad (c(x), xc(x)^2).$$ These number triangles are related according to $$(c(x), xc(x)^2)= (1,xc(x))\cdot B,$$ where $B=\left(\frac{1}{1-x}, \frac{x}{1-x}\right)$. This can be expressed as $$(c(x;0), xc(x;0)^2) = (1, xc(x;0)) \cdot (T_{n,k}(0)).$$ We generalize the above Catalan matrices in the following way. $$ (1, c(x)) \mapsto (1+r xc(x;r), xc(x;r)),$$ and $$(c(x), xc(x)^2) \mapsto (c(x;r), xc(x;r)^2).$$ We recall that the row sums of the matrix $(1+r xc(x;r), xc(x;r))$ have generating function $c(x;r)$. We then have the following result for these generalized Catalan triangles. \begin{proposition} $$(c(x;r), xc(x;r)^2) = (1+r xc(x;r), xc(x;r)) \cdot \left(\frac{1}{1-x}, \frac{x(1+rx)}{1-x}\right).$$ \end{proposition} \begin{proof} Straight-forward evaluation shows that both sides are equal. \end{proof} We have in fact that the elements of the generalized Catalan matrix $(c(x;r), xc(x;r)^2)$ are equal to $$T_{2n,n+k}(r)-T_{2n,n+k+1}(r).$$ This corresponds to the formula $$\binom{2n}{n+k}-\binom{2n}{n+k+1}$$ for the general element of the Catalan matrix $(c(x), xc(x)^2)$. We find that the general $(n,k)$-th element of the generalized Catalan triangle $(c(x;r), xc(x;r)^2)$ is equal to $$\sum_{j=0}^{n+k}\binom{n+k}{j}\binom{2n-j}{n-k-j}r^j-\sum_{j=0}^{n+k+1}\binom{n+k+1}{j}\binom{2n-j}{n-k-j-1}r^j.$$ This triangle begins $$\left( \begin{array}{ccccc} 1 & 0 & 0 & 0 & 0 \\ r+1 & 1 & 0 & 0 & 0 \\ r^2+3 r+2 & 3 r+3 & 1 & 0 & 0 \\ r^3+6 r^2+10 r+5 & 6 r^2+15 r+9 & 5 r+5 & 1 & 0 \\ r^4+10 r^3+30 r^2+35 r+14 & 10 r^3+45 r^2+63 r+28 & 15 r^2+35 r+20 & 7 r+7 & 1 \\ \end{array} \right).$$ For the values $r=0\dots4$, we obtain triangles that begin, respectively, as follows. $$\left( \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 \\ 2 & 3 & 1 & 0 & 0 & 0 \\ 5 & 9 & 5 & 1 & 0 & 0 \\ 14 & 28 & 20 & 7 & 1 & 0 \\ 42 & 90 & 75 & 35 & 9 & 1 \\ \end{array} \right),$$ $$\left( \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 2 & 1 & 0 & 0 & 0 & 0 \\ 6 & 6 & 1 & 0 & 0 & 0 \\ 22 & 30 & 10 & 1 & 0 & 0 \\ 90 & 146 & 70 & 14 & 1 & 0 \\ 394 & 714 & 430 & 126 & 18 & 1 \\ \end{array} \right),$$ $$\left( \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 3 & 1 & 0 & 0 & 0 & 0 \\ 12 & 9 & 1 & 0 & 0 & 0 \\ 57 & 63 & 15 & 1 & 0 & 0 \\ 300 & 414 & 150 & 21 & 1 & 0 \\ 1686 & 2682 & 1275 & 273 & 27 & 1 \\ \end{array} \right),$$ $$\left( \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 4 & 1 & 0 & 0 & 0 & 0 \\ 20 & 12 & 1 & 0 & 0 & 0 \\ 116 & 108 & 20 & 1 & 0 & 0 \\ 740 & 892 & 260 & 28 & 1 & 0 \\ 5028 & 7164 & 2820 & 476 & 36 & 1 \\ \end{array} \right),$$ and $$\left( \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 5 & 1 & 0 & 0 & 0 & 0 \\ 30 & 15 & 1 & 0 & 0 & 0 \\ 205 & 165 & 25 & 1 & 0 & 0 \\ 1530 & 1640 & 400 & 35 & 1 & 0 \\ 12130 & 15690 & 5275 & 735 & 45 & 1 \\ \end{array} \right).$$ We note that for $r=-1$, we get the identity matrix. The corresponding matrices $(1+r x c(x;r), xc(x,r))$ begin $$\left( \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 0 & 0 \\ 0 & 2 & 2 & 1 & 0 & 0 \\ 0 & 5 & 5 & 3 & 1 & 0 \\ 0 & 14 & 14 & 9 & 4 & 1 \\ \end{array} \right),$$ $$\left( \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 \\ 2 & 3 & 1 & 0 & 0 & 0 \\ 6 & 10 & 5 & 1 & 0 & 0 \\ 22 & 38 & 22 & 7 & 1 & 0 \\ 90 & 158 & 98 & 38 & 9 & 1 \\ \end{array} \right),$$ $$\left( \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 2 & 1 & 0 & 0 & 0 & 0 \\ 6 & 5 & 1 & 0 & 0 & 0 \\ 24 & 24 & 8 & 1 & 0 & 0 \\ 114 & 123 & 51 & 11 & 1 & 0 \\ 600 & 672 & 312 & 87 & 14 & 1 \\ \end{array} \right),$$ $$\left( \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 3 & 1 & 0 & 0 & 0 & 0 \\ 12 & 7 & 1 & 0 & 0 & 0 \\ 60 & 44 & 11 & 1 & 0 & 0 \\ 348 & 284 & 92 & 15 & 1 & 0 \\ 2220 & 1916 & 716 & 156 & 19 & 1 \\ \end{array} \right),$$ and $$\left( \begin{array}{cccccc} 1 & 0 & 0 & 0 & 0 & 0 \\ 4 & 1 & 0 & 0 & 0 & 0 \\ 20 & 9 & 1 & 0 & 0 & 0 \\ 120 & 70 & 14 & 1 & 0 & 0 \\ 820 & 545 & 145 & 19 & 1 & 0 \\ 6120 & 4370 & 1370 & 245 & 24 & 1 \\ \end{array} \right).$$ The variant of the Catalan triangle given by $(c(x),xc(x))$ becomes the family of triangles $(c(x;r), xc(x;r))$. For $r=0\ldots 2$, we obtain the triangles that begin $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 & 0 \\ 2 & 2 & 1 & 0 & 0 & 0 & 0 \\ 5 & 5 & 3 & 1 & 0 & 0 & 0 \\ 14 & 14 & 9 & 4 & 1 & 0 & 0 \\ 42 & 42 & 28 & 14 & 5 & 1 & 0 \\ 132 & 132 & 90 & 48 & 20 & 6 & 1 \\ \end{array} \right), \quad (\seqnum{A033184})$$ $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 2 & 1 & 0 & 0 & 0 & 0 & 0 \\ 6 & 4 & 1 & 0 & 0 & 0 & 0 \\ 22 & 16 & 6 & 1 & 0 & 0 & 0 \\ 90 & 68 & 30 & 8 & 1 & 0 & 0 \\ 394 & 304 & 146 & 48 & 10 & 1 & 0 \\ 1806 & 1412 & 714 & 264 & 70 & 12 & 1 \\ \end{array} \right), \quad (\seqnum{A080247})$$ and $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 3 & 1 & 0 & 0 & 0 & 0 & 0 \\ 12 & 6 & 1 & 0 & 0 & 0 & 0 \\ 57 & 33 & 9 & 1 & 0 & 0 & 0 \\ 300 & 186 & 63 & 12 & 1 & 0 & 0 \\ 1686 & 1086 & 414 & 102 & 15 & 1 & 0 \\ 9912 & 6540 & 2682 & 768 & 150 & 18 & 1 \\ \end{array} \right).$$ The production matrix of the generalized Catalan matrix $(c(x;r),xc(x;r))$ begins $$\left( \begin{array}{cccccc} r+1 & 1 & 0 & 0 & 0 & 0 \\ r+1 & r+1 & 1 & 0 & 0 & 0 \\ r+1 & r+1 & r+1 & 1 & 0 & 0 \\ r+1 & r+1 & r+1 & r+1 & 1 & 0 \\ r+1 & r+1 & r+1 & r+1 & r+1 & 1 \\ r+1 & r+1 & r+1 & r+1 & r+1 & r+1 \\ \end{array} \right).$$ The Riordan array $(g(x), f(x))$ has $\frac{g(x)}{1-y f(x)}$ as bivariate generating function. Equivalently, this can be seen as the generating function of the polynomial sequence $\sum_{k=0}^n a_{n,k}y^k$ where the matrix $(a_{n,k})$ represents the Riordan array $(g(x), f(x))$. Thus the bivariate generating function of the generalized Catalan array $(c(x;r), xc(x;r))$ is given by $$\frac{c(x;r)}{1-y xc(x;r)}=\frac{1-(r+2y)x-\sqrt{1-2(r+2)x+r^2x^2}}{2x(1-y+y(y+r)x)}.$$ This is equal to $$g(x,y)=\frac{1}{1-x(2y+r)}c\left(\frac{x(xy(y+r)-y+1)}{(1-x(2y+r))^2}\right).$$ We can express this generating function as the continued fraction $$\cfrac{1}{1-(y+r+1)x- \cfrac{(r+1)x^2}{1-(r+2)x- \cfrac{(r+1)x^2}{1-(r+2)x- \cfrac{(r+1)x^2}{1-(r+2)x-\cdots}}}}.$$ This gives us the following proposition. \begin{proposition} The matrix polynomials of the generalized Catalan array $(c(x;r), xc(x;r))$ are the moments of the family of orthogonal polynomials whose coefficient array is given by the Riordan array $$\left(\frac{1-(y-1)x}{1+(r+2)x+(r+1)x^2}, \frac{x}{1+(r+2)x+(r+1)x^2}\right).$$ \end{proposition} In the literature, it is more usual to call the reversal of the Riordan array $(c(x), xc(x))$ the Catalan matrix \seqnum{A009766}. Thus we consider the reversal of the generalized Catalan matrix $(c(x;r), xc(x;r))$. This will have bivariate generating function $$g\left(xy,\frac{1}{y}\right)=\frac{1-x(ry+2)-\sqrt{1-2xy(r+2)+r^2x^2y^2}}{2x(x(ry+1)+y-1)}.$$ This can be expressed as $$\frac{1}{1-x(ry+2)}c\left(\frac{x(x(ry+1)+y-1)}{(1-x(ry+2))^2}\right),$$ or as the continued fraction $$\cfrac{1}{1-(y(r+1)+1)x- \cfrac{(r+1)y^2x^2}{1-y(r+2)x- \cfrac{(r+1)y^2x^2}{1-y(r+2)x-\cdots}}}.$$ We have the following proposition. \begin{proposition} The matrix polynomials of the reversal of the generalized Catalan array $(c(x;r), xc(x;r))$ are the moments of the family of orthogonal polynomials whose coefficient array is given by the Riordan array $$\left(\frac{1+(y-1)x}{1+y(r+2)x+y^2(r+1)x^2}, \frac{x}{1+y(r+2)x+y^2(r+1)x^2}\right).$$ \end{proposition} The Shapiro Catalan triangle \seqnum{A039598} \cite{Shapiro} is the triangle given by $$(c(x), xc(x)) \cdot \left(\frac{1}{1-x}, \frac{x}{1-x}\right).$$ We can generalize this to the generalized Shapiro Catalan triangle $$(c(x;r), xc(x;r) )\cdot \left(\frac{1}{1-x}, \frac{x(1+rx)}{1-x}\right).$$ For $r=0\ldots 2$, we obtain the generalized Shapiro Catalan triangles that begin $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 2 & 1 & 0 & 0 & 0 & 0 & 0 \\ 5 & 4 & 1 & 0 & 0 & 0 & 0 \\ 14 & 14 & 6 & 1 & 0 & 0 & 0 \\ 42 & 48 & 27 & 8 & 1 & 0 & 0 \\ 132 & 165 & 110 & 44 & 10 & 1 & 0 \\ 429 & 572 & 429 & 208 & 65 & 12 & 1 \\ \end{array} \right), \quad (\seqnum{A039598}) $$ $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 3 & 1 & 0 & 0 & 0 & 0 & 0 \\ 11 & 7 & 1 & 0 & 0 & 0 & 0 \\ 45 & 39 & 11 & 1 & 0 & 0 & 0 \\ 197 & 205 & 83 & 15 & 1 & 0 & 0 \\ 903 & 1061 & 541 & 143 & 19 & 1 & 0 \\ 4279 & 5483 & 3285 & 1117 & 219 & 23 & 1 \\ \end{array} \right),$$ and $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 4 & 1 & 0 & 0 & 0 & 0 & 0 \\ 19 & 10 & 1 & 0 & 0 & 0 & 0 \\ 100 & 76 & 16 & 1 & 0 & 0 & 0 \\ 562 & 532 & 169 & 22 & 1 & 0 & 0 \\ 3304 & 3619 & 1504 & 298 & 28 & 1 & 0 \\ 20071 & 24394 & 12265 & 3232 & 463 & 34 & 1 \\ \end{array} \right).$$ The case $r=0$ is the Shapiro Catalan triangle. The triangle $$(c(x;r), xc(x;r) )\cdot \left(\frac{1}{1-x}, \frac{x(1+rx)}{1-x}\right)$$ is given explicitly by \begin{scriptsize} $$\left(\frac{1-(r+2)x-\sqrt{1-2(r+2)x+r^2x^2}}{2(r+1)x^2}, \frac{1-2(r+1)x+r^2x^2-(1-rx)\sqrt{1-2(r+2)x+r^2x^2}}{2x}\right),$$ \end{scriptsize} which can be expressed as $$\left(\frac{1}{1-(r+2)x}c\left(\frac{x^2(r+1)}{(1-(r+2)x)^2}\right), \frac{x}{1-2(r+1)x+r^2x^2}c\left(\frac{x^2}{(1-2(r+1)x+r^2x^2)^2}\right)\right).$$ The first element of this, given by $$\frac{1-(r+2)x-\sqrt{1-2(r+2)x+r^2x^2}}{2(r+1)x^2}=\frac{1}{1-(r+2)x}c\left(\frac{x^2(r+1)}{(1-(r+2)x)^2}\right),$$ expands to give the sequence with general term $$\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k}C_k (r+1)^k (r+2)^{n-2k}=\frac{1}{n+1}\sum_{k=0}^n \binom{n+1}{k}\binom{2n+2-k}{n+2}r^k.$$ This sequence has generating function expressible as the continued fraction $$\cfrac{1}{1-(r+2)x- \cfrac{(r+1)x^2}{1-(r+2)x- \cfrac{(r+1)x^2}{1-(r+2)x-\cdots}}}.$$ The term $\frac{1}{n+1} \binom{n+1}{k}\binom{2n+2-k}{n+2}$ is the general element of the number triangle \seqnum{A126216}, which counts the number of Schroeder paths of semi-length $n$ containing exactly $k$ peaks but no peaks at level one. The second term, divided by $x$, gives $\frac{1}{1-2(r+1)x+r^2x^2}c\left(\frac{x^2}{(1-2(r+1)x+r^2x^2)^2}\right)$. This expands to give a sequence which begins $$1, 2(r + 1), 3r^2 + 8r + 5, 2(r + 1)(2r^2 + 8r + 7), 5r^4 + 40r^3 + 105r^2 + 112r + 42, \ldots.$$ This polynomial sequence in $r$ has a coefficient array that begins $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 2 & 2 & 0 & 0 & 0 & 0 & 0 \\ 5 & 8 & 3 & 0 & 0 & 0 & 0 \\ 14 & 30 & 20 & 4 & 0 & 0 & 0 \\ 42 & 112 & 105 & 40 & 5 & 0 & 0 \\ 132 & 420 & 504 & 280 & 70 & 6 & 0 \\ 429 & 1584 & 2310 & 1680 & 630 & 112 & 7 \\ \end{array} \right).$$ Multiplying this on the right by the inverse binomial matrix $B^{-1}$, we obtain the matrix that begins $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 & 0 & 0 & 0 \\ 0 & 2 & 3 & 0 & 0 & 0 & 0 \\ 0 & 2 & 8 & 4 & 0 & 0 & 0 \\ 0 & 2 & 15 & 20 & 5 & 0 & 0 \\ 0 & 2 & 24 & 60 & 40 & 6 & 0 \\ 0 & 2 & 35 & 140 & 175 & 70 & 7 \\ \end{array} \right).$$ This is \seqnum{A281260}, the triangle of generalized Narayana numbers \cite{Callan} $$N_2(n,k)=\frac{2}{n+2} \binom{n+2}{k}\binom{n-1}{n-k}.$$ Thus the above sequence has general term $$\frac{2}{n+2}\sum_{k=0}^n \sum_{i=0}^n \binom{n+2}{i}\binom{n-1}{n-i}\binom{i}{k}r^k.$$ The bivariate generating function of the generalized Shapiro Catalan triangle can be expressed as $$\frac{(rxy+1)\sqrt{1-2(r+2)x+r^2x^2}-r^2x^2y+x(r+2)(y+1)-1}{2x(r+1)(r^2x^2y-x(y^2+2y(r+1)+1)+y)}.$$ Only in the classical case of $r=0$ does this admit a ``nice'' Jacobi continued fraction expression, which is then given by $$\cfrac{1}{1-(y+2)x- \cfrac{x^2}{1-2x- \cfrac{x^2}{1-2x- \cfrac{x^2}{1-2x-\cdots}}}}.$$ \section{Generalized Motzkin numbers} We have the formula $$M_n=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k} C_k,$$ where $M_n$ denotes the Motzkin numbers \seqnum{A001006}. Writing \begin{equation}C_n(r,s)=\sum_{k=0}^n \binom{n+k}{2k}r^{n-k}s^k C_k,\end{equation} we can define generalized Motzkin numbers \begin{equation}M_n(r,s)=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k} C_k(r,s).\end{equation} We have $M_n=M_n(0,1)$. The sequence $M_n(r,s)$ begins $$1, 1, r + s + 1, 3r + 3s + 1, r^2 + r(3·s + 6) + 2s^2 + 6s + 1,\ldots.$$ \begin{proposition} The generating function of $M_n(r,s)$ is given by the continued fraction $$\cfrac{1}{1-x- \cfrac{(r+s)x^2}{1-x- \cfrac{sx^2}{1-x- \cfrac{(r+s)x^2}{1-x- \cfrac{sx^2}{1-x-\cdots}}}}}.$$ \end{proposition} A consequence of this is that the generating function of $M_n(r,s)$ is given by $$\frac{1-x}{1-2x-(r-1)x^2}c\left(\frac{sx^2(1-x)^2}{(1-2x-(r-1)x^2)^2}\right)$$ \begin{scriptsize} $$=\frac{1-2x-(r-1)x^2-\sqrt{1-4x-2(r+2s-3)x^2+4(r+2s-1)x^3+(r^2-2r-4s+1)x^4}}{2sx^2(1-x)}.$$ \end{scriptsize} We can also form the generalized Motzkin number $$M_n(r,s,y)=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k} C_k(r,s,y).$$ We find that the generating function of $M_n(r,s,y)$ has the continued fraction form $$\cfrac{1}{1-x- \cfrac{(r+y)x^2}{1-x- \cfrac{sx^2}{1-x- \cfrac{(r+s)x^2}{1-x- \cfrac{sx^2}{1-x-\cdots}}}}}.$$ In particular, the sequence $M_n(r,s,y)$ has its Hankel transform given by $$h_n = (r+y)^n s^{\lfloor \frac{n^2}{4} \rfloor} (r+s)^{\lfloor \frac{(n-1)^2}{4} \rfloor}.$$ In particular, we have that the Hankel transform of $M_n(r,s)$ is given by $$h_n = s^{\lfloor \frac{n^2}{4} \rfloor} (r+s)^{\lfloor \frac{(n+1)^2}{4} \rfloor}.$$ \begin{example} We consider $M_n(s+1,s-1)=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor}\binom{n}{2k}\sum_{j=0}^k \binom{k+j}{2j}(s+1)^{k-j} (s-1)^j$. The generating function of this sequence is given by $$\cfrac{1}{1-x- \cfrac{2sx^2}{1-x- \cfrac{(s-1)x^2}{1-x- \cfrac{2sx^2}{1-x- \cfrac{(s-1)x^2}{1-x-\cdots}}}}}.$$ For $s=2$ we obtain the sequence $M_n(3,1)$ that begins $$ 1 , 1 ,5 , 13, 45 , 141 , 477, 1597, 5501 ,\ldots.$$ This is the binomial transform of the aeration of the sequence $$\sum_{k=0}^n N_{n,k}4^k=\sum_{k=0}^n \binom{n+k}{2k}C_k3^{n-k}$$ \seqnum{A082298}, which counts Schroeder paths of semi-length $n$ where the level steps can have $3$ colors. \end{example} Another family of generalized Motzkin numbers can be formed as follows. We recall that the Narayana triangle with general term $$N_{n,k}=\frac{1}{n+1}\binom{n+1}{k}\binom{n-1}{n-k}=0^{n+k}+\frac{1}{n+0^{nk}}\binom{n}{k}\binom{n}{k-1}$$ has the Catalan numbers as its row sums. We form the alternative generalized Motzkin numbers \begin{equation}\tilde{M}_{n}(r,s)=\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k} \sum_{i=0}^k N_{k,i}r^i s^{k-i}.\end{equation} This sequence begins $$1, 1, r + 1, 3r + 1, r^2 + r(s + 6) + 1, 5r^2 + 5r(s + 2) + 1,\ldots.$$ We find that these generalized Motzkin numbers have generating function given by the continued fraction $$\cfrac{1}{1-x- \cfrac{rx^2}{1-x- \cfrac{sx^2}{1-x- \cfrac{rx^2}{1-x- \cfrac{sx^2}{1-x-\cdots}}}}}.$$ This is equivalent to $$\frac{1-x}{1-2x-(r-s-1)x^2}c\left(\frac{sx^2(1-x)^2}{(1-2x-(r-s-1)x^2)^2}\right).$$ In particular, the Hankel transform of the sequence $\tilde{M}_{n}(r,s)$ is given by $$h_n=r^{\lfloor \frac{(n+1)^2}{4} \rfloor} s^{\lfloor \frac{n^2}{4} \rfloor}.$$ By construction, $\tilde{M}_n(r,s)$ represents the first binomial transform of the aeration of the generalized Catalan numbers given by $\sum_{k=0}^n N_{n,k}s^{n-k}r^k$ \cite{CFT}. The sequence $\sum_{k=0}^n N_{n,k}s^{n-k}r^k$ has generating function given by $$\cfrac{1}{1-\cfrac{rx}{1-\cfrac{sx}{1-\cfrac{rx}{1-\cdots}}}},$$ or $$\frac{1}{1-(r-s)x}c\left(\frac{sx}{(1-(r-s)x)^2}\right).$$ We have that $\sum_{k=0}^n N_{n,k}s^{n-k}r^k=C_n(r-s,s,s)$. Thus \begin{equation}\tilde{M}_n(r,s)=\sum_{k=0}^n \binom{n}{k}C_{\frac{k}{2}}(r-s,s,s)\frac{1+(-1)^k}{2}.\end{equation} \section{The $\mathcal{T}$ transform of the generalized Catalan numbers $C_n(r,s,s)$} We recall that the generating function of the generalized Catalan numbers $C_n(r,s,s)=\sum_{k=0}^n \binom{n+k}{2k}r^{n-k}s^kC_k$ can be expressed as the continued fraction $$\cfrac{1}{1-(r+s)x- \cfrac{s(r+s)x^2}{1-(r+2s)x- \cfrac{s(r+s)x^2}{1-(r+2s)x-\cdots}}}.$$ Taking the $\mathcal{T}$ transform \cite{Transform} of this, we obtain the generating function $$\cfrac{1}{1-(r+s)x- \cfrac{s(r+s)x^2}{1-(2r+3s)x- \cfrac{4s(r+s)x^2}{1-(3r+5s)x- \cfrac{9s(r+s)x^2}{1-(4r+7s)x- \cfrac{16s(r+s)x^2}{1-(5r+9s)x-\cdots}}}}}.$$ This expands to give the bivariate polynomial that begins $$1, r + s, (r + s)(r + 2s), (r + s)(r^2 + 6rs + 6s^2), (r + s)(r^3 + 14r^2s + 36rs^2 + 24s^3),\ldots.$$ Expressed as a polynomial in $r$, this has a coefficient array that begins $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ s & 1 & 0 & 0 & 0 & 0 & 0 \\ 2 s^2 & 3 s & 1 & 0 & 0 & 0 & 0 \\ 6 s^3 & 12 s^2 & 7 s & 1 & 0 & 0 & 0 \\ 24 s^4 & 60 s^3 & 50 s^2 & 15 s & 1 & 0 & 0 \\ 120 s^5 & 360 s^4 & 390 s^3 & 180 s^2 & 31 s & 1 & 0 \\ 720 s^6 & 2520 s^5 & 3360 s^4 & 2100 s^3 & 602 s^2 & 63 s & 1 \\ \end{array} \right).$$ We now recall that the Eulerian number triangle $E_2$ with generating function $$\frac{(1-z)e^{zx}}{e^{zx}-ze^x}$$ which begins $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 4 & 1 & 0 & 0 & 0 \\ 0 & 1 & 11 & 11 & 1 & 0 & 0 \\ 0 & 1 & 26 & 66 & 26 & 1 & 0 \\ 0 & 1 & 57 & 302 & 302 & 57 & 1 \\ \end{array} \right)$$ satisfies $$\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 4 & 1 & 0 & 0 & 0 \\ 0 & 1 & 11 & 11 & 1 & 0 & 0 \\ 0 & 1 & 26 & 66 & 26 & 1 & 0 \\ 0 & 1 & 57 & 302 & 302 & 57 & 1 \\ \end{array} \right)\cdot B$$ $$=\left( \begin{array}{ccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 & 0 \\ 2 & 3 & 1 & 0 & 0 & 0 & 0 \\ 6 & 12 & 7 & 1 & 0 & 0 & 0 \\ 24 & 60 & 50 & 15 & 1 & 0 & 0 \\ 120 & 360 & 390 & 180 & 31 & 1 & 0 \\ 720 & 2520 & 3360 & 2100 & 602 & 63 & 1 \\ \end{array} \right).$$ This last triangle then has generating function $$\frac{(1-(z+1))e^{(z+1)x}}{e^{(z+1)x}-(z+1)e^x}=\frac{ze^{(z+1)x}}{(z+1)e^x-e^{(z+1)x}}.$$ The general element of this matrix is thus $$\sum_{i=0}^n E_2(n,i)\binom{i}{k}.$$ We have the following result. \begin{proposition} The $\mathcal{T}$ transform of the generalized Catalan number $$C_n(r,s,s)=\sum_{k=0}^n \binom{n+k}{2k}r^{n-k}s^k$$ is given by the generalized Eulerian number $$\sum_{k=0}^n \left(\sum_{i=0}^n E_2(n,i)\binom{i}{k}\right)s^{n-k}r^k.$$ \end{proposition} \section{Conclusions} We have shown that starting with the family of Pascal-like triangles defined by the Riordan arrays $\left(\frac{1}{1-x}, \frac{x(1+rx)}{1-x}\right)$, we can define various generalized Catalan numbers. These numbers (or polynomials, since they depend polynomially on parameters $r, s, \ldots$) are essentially linked to colored Schroeder paths. With the aid of the generating functions $c(x;r)$ we have been able to generalize three notions of Catalan triangle in a natural way. We can furthermore use these generalized Catalan numbers to define generalized Motzkin numbers, where again the parameters can be interpreted as colors. Finally we have shown that a link exists between the generalized Catalan numbers $C_n(r,s,s)$ and certain generalized Eulerian numbers via the $\mathcal{T}$ transform. \section{Acknowledgments} The author would like to thank the reviewer for their careful reading of the paper and for their constructive remarks. This paper was completed while the author was a guest at the Applied Algebra and Optimization Research Centre (AORC) of Sungkyunkwan University, Suwon, South Korea, to which he expresses his appreciation. \section{Appendix} We provide a summary of information on the generalized Catalan numbers considered in this paper. $$C_n(r)=T_{2n,n}(r)-T_{2n,n-1}(r)=\sum_{k=0}^n \binom{n+k}{2k}r^{n-k}C_k.$$ The generating function of $C_n(r)$ is $$c(x;r)=\frac{1}{1-rx}c\left(\frac{x}{(1-rx)^2}\right)=\frac{1}{x}\text{Rev}\left(\frac{x(1-x)}{1+rx}\right).$$ These numbers are the moments for the orthogonal polynomials whose coefficient array is given by $$\left(\frac{1+x}{1+(r+2)x+(r+1)x^2}, \frac{x}{1+(r+2)x+(r+1)x^2}\right).$$ They are the row sums of the Riordan array $\left(\frac{1}{1+rx}, \frac{x(1-x)}{1+rx}\right)^{-1}$. The numbers $C_n(r,s,y)$ have generating function $$\left(\frac{1}{1+rx}, \frac{x(1-sx)}{1+rx}\right)^{-1}\cdot \frac{1}{1-yx}.$$ These numbers are the moments for the family of orthogonal polynomials with coefficient array given by $$\left(\frac{1+(2s-y)x+s(s-y)x^2}{1+(r+2s)x+s(r+s)x^2}, \frac{x}{1+(r+2s)x+s(r+s)x^2}\right).$$ We have $$C_n(r,s,s)=\sum_{k=0}^n \frac{1}{k+1}\binom{n+k}{k}\binom{n}{k}r^{n-k}s^k=\sum_{k=0}^n \frac{1}{n-k+1}\binom{2n-k}{n}\binom{n}{k}s^{n-k}r^k.$$ The generating function $c(x;r,s,s)$ of $C_n(r,s,s)$ is given by $$c(x;r,s,s)=\frac{1}{x} \text{Rev}\left(\frac{x(1-sx)}{1+rx}\right).$$ We have $$c(x;r,s,s)= \cfrac{1}{1-rx- \cfrac{sx}{1-rx- \cfrac{sx}{1-rx-\cdots}}}.$$ The numbers $C_n(r,s,s)$ are the moments of the family of orthogonal polynomials with coefficient array $$\left(\frac{1+sx}{1+(r+2s)x+s(r+s)x^2}, \frac{x}{1+(r+2s)x+s(r+s)x^2}\right).$$ The numbers $\check{C}_n(r,s,t)$ have the generating function $$\check{c}(x;r,s,t)=\frac{1}{1-rx}c\left(\frac{x(s+tx)}{(1-rx)^2}\right)=\frac{1}{x}\text{Rev}\left(\frac{x(1-sx)}{1+rx+tx^2}\right).$$ They are the moments of the family of orthogonal polynomials whose coefficient array is given by $$\left(\frac{1-sx}{1+(r+2s)x+(t+s(r+s))x^2}, \frac{x}{1+(r+2s)x+(t+s(r+s))x^2}\right).$$ The numbers $\tilde{C}_n(r,s,y)$ have their generating function given by $$\left(\frac{1-x(s+1)}{(1-x)(1+(r-1)x)}, \frac{x(1-x(s+1))}{(1-x)(1+(r-1)x)}\right)^{-1}\cdot \frac{1}{1-yx}.$$ These generalized Catalan numbers are the moments for the family of orthogonal polynomials whose coefficient matrix is given by $$\left(\frac{1+(1+s-y)x}{1+(r+2s)x+s(r+s)x^2}, \frac{x}{1+(r+2s)x+s(r+s)x^2}\right).$$ The numbers $\tilde{\tilde{C}}_n(r,s,v,w)$ have their generating function given by $$\frac{1-rx}{1-2rx-x^2(sv-r^2)}c\left(\frac{x^2 s w(1-rx)^2}{(1-2rx-x^2(sv-r^2))^2}\right).$$ Equivalently, this is given by the continued fraction $$\cfrac{1}{1-rx- \cfrac{s(v+w)x^2}{1-rx- \cfrac{swx^2}{1-rx- \cfrac{s(v+w)x^2}{1-rx- \cfrac{swx^2}{1-rx-\cdots}}}}}.$$ \begin{thebibliography}{99} \bibitem{Aigner} M. Aigner, Catalan-like numbers and determinants, \emph{J. Combin. Theory Ser. A}, \textbf{87} (1999), 33--51. \bibitem{Transform} P. Barry, On a transformation of Riordan moment sequences, \emph{J. Integer Sequences}, \textbf{21} (2018), \href{https://cs.uwaterloo.ca/journals/JIS/VOL21/Barry2/barry382.html} {Article 18.7.1}. \bibitem{Classical} P. Barry, Classical and semi-classical orthogonal polynomials defined by Riordan arrays, and their moment sequences, \emph{J. Integer Sequences}, \textbf{21} (2018), \href{https://www.emis.de/journals/JIS/VOL21/Barry/barry362.html} {Article 18.1.5}. \bibitem{Book} P. Barry, \emph{Riordan Arrays: A Primer}, Logic Press, 2017. \bibitem{Central} P. Barry, On the central coefficients of Riordan matrices, \emph{J. Integer Sequences}, \textbf{16} (2013), \href{https://cs.uwaterloo.ca/journals/JIS/VOL16/Barry1/barry242.html} {Article 13.5.1}. \bibitem{CFT} P. Barry, Continued fractions and transformations of integer sequences, \emph{J. Integer Sequences}, \textbf{12} (2009), \href{https://cs.uwaterloo.ca/journals/JIS/VOL12/Barry3/barry93.html} {Article 09.7.6}. \bibitem{Cons} P. Barry, On integer-sequence-based constructions of generalized Pascal triangles, \emph{J. Integer Sequences}, \textbf{9} (2006), \href{https://cs.uwaterloo.ca/journals/JIS/VOL9/Barry/barry91.html} {Aricle 06.2.4}. \bibitem{Callan} D. Callan, Generalized Narayana numbers, \url{http://oeis.org/A281260/a281260.pdf}. \bibitem{Chapoton} F. Chapoton, F. Hivert, and J.-C. Novelli, A set-operad of formal fractions and dendriform-like sub-operads, \emph{J. Algebra}, \textbf{465} (2016), 322--355. \bibitem{Edwards} A. W. F. Edwards, \emph{Pascal's Arithmetical Triangle: the Story of a Mathematical Idea}, Johns Hopkins University Press, 2002. \bibitem{Giraudo_2} S. Giraudo, Pluriassociative algebras II: The polydendriform operad and related operads, \emph{Adv. Appl. Math.}, \textbf{77} (2016), 3--85. \bibitem{Giraudo} S. Giraudo, Operads from posets and Koszul duality, preprint, 2016. Available at \url{https://arxiv.org/abs/1504.04529}. \bibitem{He} T.-X. He, Parametric Catalan numbers and Catalan triangles, \emph{Linear Algebra Appl.}, \textbf{438} (2013), 1467--1484. \bibitem{Henrici} P. Henrici, \emph{Applied and Computational Complex Analysis}, Vol.~3, John Wiley \& Sons, 1993. \bibitem{Kratt} C. Krattenthaler, Advanced determinant calculus: a complement, \emph{Linear Algebra Appl.}, {\bf 411} (2005), 68--166. \bibitem{Layman} J. W. Layman, The Hankel transform and some of its properties, \emph{J. Integer Sequences}, {\bf 4} (2001), \href{http://www.cs.uwaterloo.ca/journals/JIS/VOL4/LAYMAN/hankel.html} {Article 01.1.5}. \bibitem{Marchenko} V. A. Mar\v cenko and L. A. Pastur, Distribution of eigenvalues for some sets of random matrices, \emph{Sb. Math.}, \textbf{1} (1967), 457--483. \bibitem{Lagrange} D. Merlini, R. Sprugnoli, and M.~C.~Verri, Lagrange inversion: when and how, \emph{Acta Appl. Math.}, \textbf{94} (2006), 233--249. \bibitem{Petreolle} M. P\'etr\'eolle, A. D. Sokal, and B.-X. Zhu, Lattice paths and branched continued fractions: an infinite sequence of generalizations of the Stieltjes-Rogers and Thron-Rogers polynomials, with coefficientwise Hankel-total positivity, preprint, 2018. Available at \url{https://arxiv.org/abs/1807.03271}. \bibitem{Roblet} E. Roblet and X. G. Viennot, Th\'eorie combinatoire des T-fractions et approximants de Pad\'e en deux points, \emph{Discrete Math.}, \textbf{153} (1996), 271--288. \bibitem{Survey} L. Shapiro, A survey of the Riordan group, {Center for Combinatorics}, Nankai University, 2018. Available electronically at \url{http://www.combinatorics.cn/activities/Riordan\%20Group.pdf} \ . \bibitem{SGWW} L. W. Shapiro, S. Getu, W.-J. Woan, and L. C. Woodson, The Riordan group, \emph{Discr. Appl. Math.} \textbf{34} (1991), 229--239. \bibitem{Shapiro} L. W. Shapiro, A Catalan triangle, \emph{Discrete Math.}, \textbf{14} (1976), 83--90. \bibitem{SL1} N. J. A.~Sloane, \emph{The On-Line Encyclopedia of Integer Sequences}. Published electronically at \url{https://oeis.org}, 2018. \bibitem{SL2} N. J. A.~Sloane, The On-Line Encyclopedia of Integer Sequences, \emph{Notices Amer. Math. Soc.}, \textbf{50} (2003), 912--915. \bibitem{Stanley} R. P. Stanley, \emph{Catalan Numbers}, Cambridge University Press, 2015. \bibitem{Wall} H.~S. Wall, \emph{Analytic Theory of Continued Fractions}, AMS Chelsea Publishing, 2001. \bibitem{Yaskov} P. Yaskov, A short proof of the Marchenko-Pastur theorem, preprint, 2015. Available at \url{https://arxiv.org/abs/1506.04922}. \end{thebibliography} \bigskip \hrule \bigskip \noindent 2010 {\it Mathematics Subject Classification}: Primary 15B36; Secondary 05A10, 05A15, 11C20, 11B83, 42C05. \noindent \emph{Keywords:} Pascal-like triangle, Riordan array, Catalan number, Catalan triangle, Motzkin number, generating function, continued fraction, orthogonal polynomial, moment. \bigskip \hrule \bigskip \noindent (Concerned with sequences \seqnum{A000108}, \seqnum{A000984}, \seqnum{A001006}, \seqnum{A006318}, \seqnum{A007318}, \seqnum{A008288}, \seqnum{A009766}, \seqnum{A033184}, \seqnum{A033282}, \seqnum{A039598}, \seqnum{A047891}, \seqnum{A054726}, \seqnum{A060693}, \seqnum{A064063}, \seqnum{A064641}, \seqnum{A078740}, \seqnum{A080247}, \seqnum{A082298}, \seqnum{A082301}, \seqnum{A082298}, \seqnum{A082302}, \seqnum{A086810}, \seqnum{A088617}, \seqnum{A090442}, \seqnum{A090452}, \seqnum{A103210}, \seqnum{A103211}, \seqnum{A108524}, \seqnum{A126216}, \seqnum{A131198}, \seqnum{A133305}, \seqnum{A152600}, \seqnum{A152601}, \seqnum{A269730}, \seqnum{A269731}, and \seqnum{A281260}.) \bigskip \hrule \bigskip \vspace*{+.1in} \noindent Received December 20 2018; revised version received June 27 2019. Published in {\it Journal of Integer Sequences}, August 24 2019. \bigskip \hrule \bigskip \noindent Return to \htmladdnormallink{Journal of Integer Sequences home page}{https://cs.uwaterloo.ca/journals/JIS/}. \vskip .1in \end{document} .