1 Introduction

The Motzkin number \(m_n\) is the number of different ways of drawing non-intersecting chords on a circle between n points. It is denoted by A001006 in the On-Line Encyclopedia of Integer Sequences [21] and the first few members are given by \(1, 1, 2, 4, 9, 21, 51, 127,\ldots \). The sequence of Motzkin numbers has very diverse applications in geometry, combinatorics, and number theory [1]. It satisfies the following recurrence relation:

$$\begin{aligned} m_{n+1}=m_n+\sum ^{n-1}_{i=0}m_i\cdot m_{n-1-i}=\frac{2n+3}{n+3}\cdot m_n+\frac{3n}{n+3}\cdot m_{n-1}. \end{aligned}$$

It is also known that

$$\begin{aligned} m_n= \sum _{k=0}^{[n/2]}\frac{n!}{k!(k+1)!(n-2k)!}. \end{aligned}$$

The generating function \(M(x)=\sum _{k=0}^{\infty }m_k x^k\), is given by

$$\begin{aligned} M(x)=\frac{1-x-\sqrt{1-2x-3x^2}}{2x^2}, \end{aligned}$$
(1)

and satisfies \(M(x)=1+xM(x)+x^2M^2(x)\).

Motzkin numbers represent the number of planar paths which do not descend below the x-axis, starting at (0, 0) and ending at (n, 0), where allowed steps are (1, 0), (1, 1), and \((1,-1)\). Adding a weight t to (1, 0) steps and weight 1 to (1, 1) and \((1,-1)\) steps, one obtains a weighted version of Motzkin numbers, called t-Motzkin numbers and denoted by \(m_n^t\). If we avoid the condition that the path do not descend below the x-axis, then such paths are counted by the sequence of central trinomial coefficients \(c_n\). Recall that \(c_n\) is the coefficient of \(x^n\) in the expansion \((1+x+x^2)^n\). In the literature, there are a lot of papers dealing with the (generalized) central trinomial coefficients and their Hankel transform [11, 18, 20]. There is a similar situation with the Motzkin and weighted Motzkin numbers [4, 7, 13, 14].

In a recent paper [4], Cameron and Yip evaluated the Hankel transform of the sequences \(m^t_n+m_{n+1}^t\) and \(m^t_{n+1}+m_{n+2}^t\) using the combinatorial Gessel–Viennot–Lindstrom (GVL) method [11]. On the other hand, method based on orthogonal polynomials is successfully applied on the similar sequences involving (generalized) Catalan numbers [6, 19] and (generalized) central trinomial coefficients [18]. The aim of this paper is to consider the Hankel transform evaluation of some linear combinations of two, three, and four consecutive Motzkin numbers. Using these results, we can reobtain known Hankel transform evaluations of the Motzkin and shifted Motzkin numbers, and also show some new interesting evaluations involving concrete linear combinations of Motzkin numbers. This paper also gives an idea of how to apply the method based on orthogonal polynomials on the sequences which have zero entries in their Hankel transforms.

2 Hankel Transform of the Moment Sequences

The Hankel transform is an important not invertible transform on integer sequences, which has been studied much recently [6, 16, 18].

Definition 2.1

The Hankel transform of a given sequence \(a=\left( a_n\right) _{n \in {\mathbb {N}}_0}\) is the sequence of Hankel determinants \(\left( h_n\right) _{n \in {\mathbb {N}}_0}\) where \(h_{n}=\det [a_{i+j-2}]_{i,j=1}^{n}\), i.e,

$$\begin{aligned} a=\left( a_n\right) _{n \in {\mathbb {N}}_0}\quad \Longrightarrow ^{\mathcal {H}} \quad h=\left( h_n\right) _{n \in {\mathbb {N}}_0}:\quad h_n=\det \left[ \begin{array}{ccccc} a_0\ &{} a_1\ &{} \cdots &{} a_n \\ a_1\ &{} a_2\ &{} &{} a_{n+1} \\ \vdots &{} &{} \ddots &{} \\ a_n\ &{} a_{n+1}\ &{} &{} a_{2n} \end{array} \right] . \end{aligned}$$
(2)

We denote Hankel transform by \(\mathcal {H}\) and hence we write \(h=\mathcal {H}(a)\).

Hankel determinants are sometimes also called persymmetric or Turanian determinants. Although the determinants of Hankel matrices had been defined and explored before, the term Hankel transform was introduced in 2001 by Layman [16]. Many different evaluations of the Hankel transform are known in the literature. We particularly denote method based on continued fractions [3], method based on the exponential generating function [12], method based on differential-convolution equations [8, 9], and method based on the orthogonal polynomials [6, 18, 19]. A concise review of different methods for determinant evaluations, including Hankel determinants, is given in the papers of Krattenthaler [13, 14].

In this paper, we use the method based on the orthogonal polynomials for the Hankel transform evaluation. This method was developed in [6] and later in [18, 19].

Let \(\left( a_n\right) _{n \in {\mathbb {N}}_0}\) be the moment sequence with respect to some measure \(d\lambda (x)\). In other words, let

$$\begin{aligned} a_n =\int _{\mathbb R} x^n \mathrm{d}\lambda (x) \quad (n=0,1,2,\ldots ). \end{aligned}$$
(3)

Then the Hankel transform \(h=\mathcal {H}(a)\) of the sequence \(a=\left( a_n\right) _{n \in {\mathbb {N}}_0}\) can be expressed by the following relation known as the Heilermann formula (for example, see Krattenthaler [14])

$$\begin{aligned} h_n=a_0^{n+1} \beta _1^{n} \beta _2^{n-1} \ldots \beta _{n-1}^2 \beta _{n}. \end{aligned}$$
(4)

The sequence \(\left( \beta _n\right) _{n \in {\mathbb {N}}_0}\) appears as a sequence of coefficients in the three-term recurrence relation

$$\begin{aligned} P_{n+1}(x)=(x-\alpha _n)P_n(x)-\beta _nP_{n-1}(x), \end{aligned}$$
(5)

satisfied by the monic orthogonal polynomials \(\left( P_n(x)\right) _{n \in {\mathbb {N}}_0}\) with respect to the measure \(d\lambda (x)\). Weight function (measure) transformations are often used to derive the closed-form expression for the coefficient \(\beta _n\).

3 Moment Representation, Orthogonal Polynomials, and Hankel Transform of the Motzkin Numbers

In this section, we introduce the moment representation of the Motzkin numbers and evaluate its Hankel transform.

In the rest of the paper, we also deal with the shifted Motzkin numbers \(\left( m^*_n\right) _{n \in {\mathbb {N}}_0}\), \(\left( m^{**}_n\right) _{n \in {\mathbb {N}}_0}\), and \(\left( m^{***}_n\right) _{n \in {\mathbb {N}}_0}\) defined by \(m^*_n=m_{n+1}\), \(m^{**}_n=m_{n+2}\), and \(m^{***}_n=m_{n+3}\). Furthermore, denote by \(h_n\), \(h^*_n\), \(h^{**}_n\), and \(h^{***}_n\) the Hankel transforms of \(m_n\), \(m^*_n\), \(m^{**}_n\), and \(m^{***}_n\), respectively.

The following theorem gives an explicit expression of the weight function which moment sequence is \(\left( m_n\right) _{n \in {\mathbb {N}}_0}\). Its formulation can be found, for example, in [21] or in the paper [2] where the proof based on the Stieltjes–Perron inversion formula (see for example [5, 15]) is shown.

Theorem 3.1

[2] Motzkin numbers \(\left( m_n\right) _{n \in {\mathbb {N}}_0}\) are moments of the weight function

$$\begin{aligned} w(x)={\left\{ \begin{array}{ll} \dfrac{1}{2\pi }{\sqrt{4-(x-1)^2}},&{} \quad x \in [-1,3]\\ 0, &{} \quad \mathrm {otherwise} \end{array}\right. }. \end{aligned}$$
(6)

To compute the Hankel transform \(h_n\) using the Heilermann formula (4), we need the coefficients \(\alpha _n\) and \(\beta _n\) of the three-term recurrence relation, corresponding to the weight function w(x). These coefficients will be obtained by applying weight function transformations. Lemmas 3.2 and 3.3 provide relations between the coefficients \(\alpha _n\) and \(\beta _n\) of the original and transformed weight function.

Lemma 3.2

Let w(x) and \(\tilde{w}(x)\) be the weight functions and denote by \(\left( \pi _n(x)\right) _{n \in {\mathbb {N}}_0}\) and \(\left( \tilde{\pi }_n(x)\right) _{n \in {\mathbb {N}}_0}\) the corresponding orthogonal polynomials. Also denote by \(\left( \alpha _n\right) _{n \in {\mathbb {N}}_0},\left( \beta _n\right) _{n \in {\mathbb {N}}_0}\), and \(\left( \tilde{\alpha }_n\right) _{n \in {\mathbb {N}}_0}\),\(\left( \tilde{\beta }_n\right) _{n \in {\mathbb {N}}_0}\) the three-term relation coefficients corresponding to w(x) and \(\tilde{w}(x)\) respectively. The following transformation formulas are valid:

(1) :

If \(\tilde{w}(x)=Cw(x)\) where \(C>0\), then we have \(\tilde{\alpha }_n=\alpha _n\) for \(n \in {\mathbb {N}}_0\) and \(\tilde{\beta }_0=C\beta _0\), \(\tilde{\beta }_n=\beta _n\) for \(n \in {\mathbb {N}}\). Additionally there holds \(\tilde{\pi }_n(x)=\pi _n(x)\) for all \(n \in {\mathbb {N}}_0\).

(2) :

If \(\tilde{w}(x)=w(ax+b)\) where \(a,b \in {\mathbb {R}}\) and \(a\ne 0\), there holds \(\tilde{\alpha }_n = \frac{\alpha _n-b}{a}\) for \(n \in {\mathbb {N}}_0\) and \(\tilde{\beta }_0 = \frac{\beta _0}{|a|}\) and \(\tilde{\beta }_n = \frac{\beta _n}{a^2}\) for \(n \in {\mathbb {N}}\). Additionally there holds \(\tilde{\pi }_n(x)=\frac{1}{a^n}\pi _n (ax+b)\).

Proof

In both cases, we directly check the orthogonality of \(\bar{\pi }_n(x)\) and obtain the coefficients \(\bar{\alpha }_n\) and \(\bar{\beta }_n\) by putting \(\bar{\pi }_n(x)\) in the three-term recurrence relation for \(\pi _n(x)\). \(\square \)

Lemma 3.3

(Linear multiplier transformation) [10] Consider the same notation as in Lemma 3.2. Let the sequence \(\left( r_n\right) _{n \in {\mathbb {N}}_0}\) be defined by

$$\begin{aligned} r_0=c-\alpha _0,\quad r_n=c-\alpha _n- \frac{\beta _n}{r_{n-1}} \quad (n \in {\mathbb {N}}_0). \end{aligned}$$
(7)

If \(\tilde{w}(x)=(x-c)w(x)\) where \(c< \inf \sup (w),\) there holds

$$\begin{aligned} \tilde{\beta }_0= & {} \int _{{\mathbb {R}}}\tilde{w}(x)\ dx, \quad \tilde{\beta }_n=\beta _n\frac{r_n}{r_{n-1}}, \quad (n \in {\mathbb {N}}), \nonumber \\ \tilde{\alpha }_n= & {} \alpha _{n+1}+r_{n+1}-r_n, \quad (n \in {\mathbb {N}}_0).\ \end{aligned}$$
(8)

In the following theorem, we give a new proof of the well-known result about the Hankel transform of the Motzkin numbers (see for example [1, 4]). The proof is based on the weight function transformation shown in Lemma 3.2. Derived expressions for the coefficients \(\alpha _n\) and \(\beta _n\) will be used for the further evaluations shown in the latter sections.

Theorem 3.4

The Hankel transform of the sequence Motzkin numbers \(\left( m_n\right) _{n \in {\mathbb {N}}_0}\) is the sequence of all 1’s. Coefficients \(\alpha _n\) and \(\beta _n\) of the three-term recurrence relation are given by

$$\begin{aligned} \alpha _n=\beta _n=1, \quad (n \in {\mathbb {N}}_0). \end{aligned}$$

Proof

The monic Chebyshev polynomials of the second kind

$$\begin{aligned} Q^{(1)}_n(x)=S_n(x)=\frac{\sin \bigl ((n+1)\arccos x\bigr )}{2^n \cdot \sqrt{1-x^2}} \end{aligned}$$

are orthogonal with respect to the weight \(w^{(0)}(x)=\sqrt{1-x^2}\). The corresponding coefficients in three-term relation are

$$\begin{aligned} \beta ^{(1)}_0=\frac{\pi }{2}, \quad \beta ^{(1)}_n=\frac{1}{4} \quad (n\ge 1), \quad \alpha ^{(1)}_n=0 \quad (n\ge 0). \end{aligned}$$

Let us introduce new weight function \(w^{(1)}(x)=\sqrt{1-\left( \frac{x-1}{2}\right) ^2}\). It satisfies \(w^{(1)}(x)=w^{(0)}(ax+b),\) where \(a=1/2\) and \(b=-1/2\). Hence we get (see Lemma 3.2):

$$\begin{aligned} \beta ^{(1)}_0=\pi , \quad \beta ^{(1)}_n=1 \quad (n\in {\mathbb {N}}), \quad \alpha ^{(1)}_n=1 \quad (n\in {\mathbb {N}}_0) \ . \end{aligned}$$

Since \(w(x)=\frac{1}{\pi } w^{(1)}(x)\), Lemma 3.2 implies \(\beta _0=\frac{1}{\pi }\beta ^{(1)}_0=1\), \(\beta _n=\beta ^{(1)}_n=1\) for \(n \ge 1\) and \(\alpha _n=\alpha ^{(1)}_n=1\). The expression for the Hankel transform of the Motzkin numbers now follows directly from the Heilermann formula (4). \(\square \)

4 Linear Combination of Two Consecutive Motzkin Numbers

The advantage of the method based on orthogonal polynomials is the fact that, by knowing the coefficients \(\alpha _n\) and \(\beta _n\) corresponding to some sequence, we can effectively obtain the coefficients and the Hankel transform of the linear combination of consecutive members of that sequence. That is demonstrated on the sequence of Motzkin numbers.

Theorem 4.1

The Hankel transform \(\bar{h}_n(c)\) of the sequence \(\left( m_{n+1}-c\cdot m_n\right) _{n \in {\mathbb {N}}_0}\), where \(\left( m_n\right) _{n \in {\mathbb {N}}_0}\) is the sequence of Motzkin numbers and \(c\in {\mathbb {R}}\), is given by

$$\begin{aligned} \bar{h}_n(c)= & {} \frac{1}{\sqrt{c^2-2c-3}}\cdot \left[ \left( \frac{1-c+\sqrt{c^2-2c-3}}{2}\right) ^{n+2}\right. \nonumber \\&\left. -\left( \frac{1-c-\sqrt{c^2-2c-3}}{2}\right) ^{n+2}\right] . \end{aligned}$$
(9)

Proof

We start the proof by introducing the following weight function transformation

$$\begin{aligned} \bar{w}(x)=(x-c)w(x) \end{aligned}$$

and by applying Lemma 3.3. The coefficients \(\bar{\alpha }_n\) and \(\bar{\beta }_n\) are given by

$$\begin{aligned} \bar{\alpha }_n= & {} \alpha _{n+1}+\bar{r}_{n+1}-\bar{r}_n=1+\bar{r}_{n+1}-\bar{r}_n, \quad n\ge 0, \end{aligned}$$
(10)
$$\begin{aligned} \bar{\beta }_0= & {} \int ^3_{-1}\bar{w}(x)dx=1-c, \quad \bar{\beta }_n=\beta _n \frac{\bar{r}_n}{\bar{r}_{n-1}}=\frac{\bar{r}_n}{\bar{r}_{n-1}}, \quad n\ge 1, \end{aligned}$$
(11)

where the sequence \(\left( \bar{r}_n\right) _{n \in {\mathbb {N}}_0}\) is determined by the following recurrence relation:

$$\begin{aligned} \bar{r}_0=c-1, \quad \bar{r}_n=c-\alpha _n-\frac{\beta _n}{\bar{r}_{n-1}}=c-1-\frac{1}{\bar{r}_{n-1}}, \quad n\ge 1. \end{aligned}$$
(12)

Using previous expression, we obtain \(\bar{r}_1=c-1-\frac{1}{c-1}\), \(\bar{r}_2=c-1-\frac{c-1}{c(c-2)}=\frac{(c-1)(c^2-3c+1)}{c(c-2)}\).

According to the Heilermann formula (4) there holds

$$\begin{aligned} \frac{\bar{h}_{n+1}(c)}{\bar{h}_n(c)}=\bar{\beta }_0\cdot \bar{\beta }_1\cdot \bar{\beta }_2 \ldots \bar{\beta }_{n+1}=-\bar{r}_{n+1}. \end{aligned}$$

Using the recurrence relation (12) along with the previous expression, we obtain the following difference equation

$$\begin{aligned} \bar{h}_n(c)+(c-1) \bar{h}_{n-1}(c)+\bar{h}_{n-2}(c)=0, \quad n\ge 2 \end{aligned}$$
(13)

with initial values

$$\begin{aligned} \bar{h}_0(c)=1-c, \quad \bar{h}_1(c)=c^2-2c. \end{aligned}$$

By solving linear difference equation (13), we get (9). \(\square \)

As a direct corollary of the previous theorem, we re-obtain the Hankel transform of the shifted sequence \(m^*_n=m_{n+1}\). This result appears in [4], and with several other extensions, using the G–V–L method, in [17].

Corollary 4.2

The Hankel transform of the sequence shifted Motzkin numbers \(\left( m^*_n\right) _{n \in {\mathbb {N}}_0}\) is given by:

$$\begin{aligned} h^*_n= {\left\{ \begin{array}{ll} \begin{aligned} 1,\quad &{} n=6k \quad &{} \mathrm{or} \quad &{} n=6k+5 \\ 0, \quad &{} n=6k+1 \quad &{} \mathrm{or} \quad &{} n=6k+4 \\ -1, \quad &{} n=6k+2 \quad &{} \mathrm{or} \quad &{} n=6k+3 \end{aligned} \end{array}\right. } (k \in {\mathbb {N}}_0). \end{aligned}$$
(14)

Proof

If we put \(c=0\) in the expression (9) we have

$$\begin{aligned} h^*_n=\bar{h}_n(0)=\frac{-1+i\sqrt{3}}{2i\sqrt{3}}\left( \frac{1+i\sqrt{3}}{2}\right) ^n+\frac{1+i\sqrt{3}}{2i\sqrt{3}}\left( \frac{1-i\sqrt{3}}{2}\right) ^n \end{aligned}$$
(15)

which is equivalent to (14). \(\square \)

Moreover, the expression (9) contains some other nice evaluations, given in the next example.

Example 4.1

Consider the special cases of (9), providing the following Hankel transform evaluations:

  1. 1.

    \(c=1\). The Hankel transform of \(m_{n+1}-m_n\) is \(\bar{h}(1)=(0,-1,0,1,\ldots )\).

  2. 2.

    \(c=2\). The Hankel transform of \(m_{n+1}-2m_n\) is \(\bar{h}(2)=(-1,0,1,-1,0,1,\ldots )\).

  3. 3.

    By direct evaluation using (9), it can be shown that \(\bar{h}_n(-c)=(-1)^{n+1} \bar{h}_n(2+c)\).

  4. 4.

    Taking a limit of (9) when \(c\rightarrow -1\) we find that the Hankel transform of \(m_{n+1}+m_n\) is given by \(\bar{h}_n(-1)=n+2\). This also follows from [4, Theorem 4.4].

  5. 5.

    Similarly, when \(c\rightarrow 3\), we find that the Hankel transform of \(m_{n+1}-3m_n\) is given by \(\bar{h}_n(-3)=(-1)^{n+1} (n+2)\).

5 Linear Combination of Three Consecutive Motzkin Numbers

Let us consider the linear combination of three consecutive Motzkin numbers, i.e., the sequence \(m_{n+2}-a\cdot m_{n+1}+b\cdot m_n\), where a and b are arbitrary constants. Denote its Hankel transform by \(\hat{h}_n(a,b)\). Theorem 5.1 shows that \(\hat{h}_n(a,b)\) satisfies a particular difference equation (as it was the case in the previous section).

Theorem 5.1

For arbitrary \(a,b\in {\mathbb {R}}\), the Hankel transform \({\hat{h}}_n(a,b)\) of the sequence

$$\begin{aligned} \left( m_{n+2}-a\cdot m_{n+1}+b\cdot m_n\right) _{n \in {\mathbb {N}}_0} \end{aligned}$$

satisfies difference equation

$$\begin{aligned} \begin{aligned}&\left( \bar{h}_{n-1}(a,b)\right) ^2\cdot \hat{h}_n(a,b) -\left[ \sqrt{a^2-4b}\cdot \bar{h}_{n-1}(a,b) \cdot \bar{h}_n(a,b)\right. \\&\quad \left. +\left( \bar{h}_{n-1}(a,b)\right) ^2+\left( \bar{h}_n(a,b)\right) ^2 \right] \cdot \hat{h}_{n-1}(a,b)+ \left( \bar{h}_n(a,b)\right) ^2\cdot \hat{h}_{n-2}(a,b)=0 \end{aligned} \end{aligned}$$
(16)

with initial values: \(\hat{h}_0(a,b)=2-a+b\), \(\hat{h}_1(a,b)=2-a+5b-2ab+b^2\) where \(\bar{h}_n(a,b)=\bar{h}_n(c)\) is given by (9) and \(c=\frac{a+\sqrt{a^2-4b}}{2}\).

Proof

Given sequence has weight function

$$\begin{aligned} \hat{w}(x)= & {} \left( x-\frac{a-\sqrt{a^2-4b}}{2}\right) \cdot \left( x-\frac{a+\sqrt{a^2-4b}}{2}\right) \cdot w(x)\\= & {} \left( x-\frac{a-\sqrt{a^2-4b}}{2}\right) \cdot \bar{w}(x). \end{aligned}$$

As in the proof of the previous theorem, we start with the following transformation \(\hat{w}(x)=(x-d)\bar{w}(x)\) where \(d=\frac{a-\sqrt{a^2-4b}}{2}\), and apply Lemma 3.3. Recall that \(\bar{w}(x)=(x-c)w(x)\), as well as \(\bar{r}_n\), \(\bar{\alpha }_n\), and \(\bar{\beta }_n\) are functions of c. By taking \(c=\frac{a+\sqrt{a^2-4b}}{2}\), those expressions are now functions of a and b. The coefficients \(\hat{\alpha }_n\) and \(\hat{\beta }_n\) are given by

$$\begin{aligned} \hat{\alpha }_n= & {} \bar{\alpha }_{n+1}+\hat{r}_{n+1}-\hat{r}_n=1+\bar{r}_{n+2}-\bar{r}_{n+1}+\hat{r}_{n+1}-\hat{r}_n, \quad n\ge 0, \end{aligned}$$
(17)
$$\begin{aligned} \hat{\beta }_0= & {} \int ^3_{-1}\hat{w}(x)dx=2-a+b, \quad \hat{\beta }_n=\bar{\beta }_n \cdot \frac{\hat{r}_n}{\hat{r}_{n-1}}=\frac{\bar{r}_n}{\bar{r}_{n-1}}\cdot \frac{\hat{r}_n}{\hat{r}_{n-1}}, \quad n\ge 1, \end{aligned}$$
(18)

where the sequence \(\left( \hat{r}_n\right) _{n \in {\mathbb {N}}_0}\) is determined by the following recurrence relation:

$$\begin{aligned} \begin{aligned} \hat{r}_0&=d-\bar{\alpha }_0=\frac{4-2a+2b}{a-2+\sqrt{a^2-4b}}, \\ \hat{r}_n&=d-\bar{\alpha }_n-\frac{\bar{\beta }_n}{\hat{r}_{n-1}}, \quad n\ge 1. \end{aligned} \end{aligned}$$
(19)

According to the previous expression and Heilermann formula (4) we have

$$\begin{aligned} \frac{\hat{h}_{n+1}(a,b)}{\hat{h}_n(a,b)}=\hat{\beta }_0\cdot \hat{\beta }_1\cdot \hat{\beta }_2\cdots \hat{\beta }_{n+1}=(2-a+b)\cdot \frac{\bar{r}_{n+1}}{\bar{r}_0}\cdot \frac{\hat{r}_{n+1}}{\hat{r}_0}=- \frac{\bar{h}_{n+1}(a,b)}{\bar{h}_n(a,b)}\cdot \hat{r}_{n+1} \end{aligned}$$

which implies

$$\begin{aligned} \hat{r}_{n+1}=-\frac{\hat{h}_{n+1}(a,b)}{\hat{h}_n(a,b)}\cdot \frac{\bar{h}_n(a,b)}{\bar{h}_{n+1}(a,b)}. \end{aligned}$$

Using the recurrence relation (19), we obtain

$$\begin{aligned} \begin{aligned} \hat{r}_n&=d-\bar{\alpha }_n-\frac{\bar{\beta }_n}{\hat{r}_{n-1}}=d-(1+\bar{r}_{n+1}-\bar{r}_n)-\frac{\frac{\bar{r}_n}{\bar{r}_{n-1}}}{\hat{r}_{n-1}}\\&=d-(1+c-\alpha _{n+1}-\frac{\beta _n}{\bar{r}_n}-\bar{r}_n)+\frac{\bar{r}_n}{\bar{r}_{n-1}}\cdot \frac{\bar{h}_{n-1}(a,b)\cdot \hat{h}_{n-2}(a,b)}{\bar{h}_{n-2}(a,b)\cdot \hat{h}_{n-1}(a,b)}\\&=-\sqrt{a^2-4b}-\frac{\bar{h}_{n-1}(a,b)}{\bar{h}_n(a,b)}-\frac{\bar{h}_n(a,b)}{\bar{h}_{n-1}(a,b)}+\frac{\bar{h}_n(a,b)}{\bar{h}_{n-1}(a,b)}\cdot \frac{\hat{h}_{n-2}(a,b)}{\hat{h}_{n-1}(a,b)} \end{aligned} \end{aligned}$$

which implies (16) with the initial values: \(\hat{h}_0(a,b)=2-a+b\) and \(\hat{h}_1(a,b)=2-a+5b-2ab+b^2\). \(\square \)

Note that in general case, it is difficult to obtain the closed-form solution of the equation (16). Therefore, we consider two special cases.

1. By putting \(b=0\) and \(a=c\), our sequence reduces to the linear combination of two shifted Motzkin numbers \(m_{n+2}-c\cdot m_{n+1}=m^*_{n+1}-c \cdot m^*_n\). Denote the Hankel transform of this sequence by \(\bar{h}^*_n(c)\). The difference equation (16) is now reduced to

$$\begin{aligned}&\left[ \bar{h}_{n-1}(c)\right] ^2\cdot \bar{h}^*_n(c)- \left[ \left( \bar{h}_{n-1}(c)\right) ^2+\left( \bar{h}_n(c)\right) ^2+c\cdot \bar{h}_{n-1}(c)\cdot \bar{h}_n(c)\right] \cdot \bar{h}^*_{n-1}(c)\nonumber \\&\quad +\left[ \bar{h}_n(c)\right] ^2\cdot \bar{h}^*_{n-2}(c)=0 \end{aligned}$$
(20)

with initial values: \(\bar{h}^*_0(c)=\bar{h}^*_1(c)=2-c\). Unfortunately, it is still difficult to find its solution as the closed-form expression.

However, in the special case \(c=-1\) it can be proven by mathematical induction that the Hankel transform of \(m_{n+2}+m_{n+1}\) is given by

$$\begin{aligned} \bar{h}_n^*(-1)={\left\{ \begin{array}{ll} 6k+3, &{} n=6k \quad \mathrm{or} \quad n=6k+1\\ -1,&{} n=6k+2\\ -6(k+1)&{} n=6k+3 \quad \mathrm{or} \quad n=6k+4\\ 1,&{} n=6k+5 \end{array}\right. } . \end{aligned}$$
(21)

Recall that we have already shown in the previous section that \(\bar{h}_n(-1)=n+2\).

2. By putting \(b=c^2\) and \(a=2c\), our sequence reduces to \(m_{n+2}-2c\cdot m_{n+1}+c^2\cdot m_n\). Denote its Hankel transform by \(\hat{h}_n(c)\), which satisfies the following difference equation

$$\begin{aligned} \left[ \bar{h}_{n-1}(c)\right] ^2\cdot \hat{h}_n(c)- \left[ \left( \bar{h}_{n-1}(c)\right) ^2+\left( \bar{h}_n(c)\right) ^2 \right] \cdot \hat{h}_{n-1}(c)+ \left[ \bar{h}_n(c)\right] ^2\cdot \hat{h}_{n-2}(c)=0,\nonumber \\ \end{aligned}$$
(22)

with the initial values: \(\hat{h}_0(c)=c^2-2c+2\) and \(\hat{h}_1(c)=c^4-4c^3+5c^2-2c+2\). This equation can be solved in closed-form, which is proven by the following theorem.

Theorem 5.2

For arbitrary \(c\in {\mathbb {R}}\), the Hankel transform \(\hat{h}_n(c)\) of the sequence

$$\begin{aligned} \left( m_{n+2}-2c\cdot m_{n+1}+c^2\cdot m_n\right) _{n \in {\mathbb {N}}_0} \end{aligned}$$

is given by

$$\begin{aligned} \begin{aligned} \hat{h}_n(c)&=\frac{1}{(c^2-2c-3)^{3/2}}\left[ H_1^{2n+5}-H_2^{2n+5}\right] -\frac{5+2n}{c^2-2c-3} \end{aligned} , \end{aligned}$$
(23)

where

$$\begin{aligned} H_1=\frac{1-c+\sqrt{c^2-2c-3}}{2}, \quad H_2=\frac{1-c-\sqrt{c^2-2c-3}}{2}. \end{aligned}$$

Proof

Consider the difference equation (22). From here, we conclude that is valid:

$$\begin{aligned} \begin{aligned} \hat{h}_n(c)-\hat{h}_{n-1}(c)&=\left( \hat{h}_{n-1}(c)-\hat{h}_{n-2}(c)\right) \cdot \frac{\left( \bar{h}_n(c)\right) ^2}{\left( \bar{h}_{n-1}(c)\right) ^2}\\&=\left( \hat{h}_1(c)-\hat{h}_0(c)\right) \cdot \frac{\left( \bar{h}_2(c)\right) ^2}{\left( \bar{h}_1(c)\right) ^2}\cdot \frac{\left( \bar{h}_3(c)\right) ^2}{\left( \bar{h}_2(c)\right) ^2}\cdots \frac{\left( \bar{h}_n(c)\right) ^2}{\left( \bar{h}_{n-1}(c)\right) ^2}\\&=\left( \hat{h}_1(c)-\hat{h}_0(c)\right) \cdot \frac{\left( \bar{h}_n(c)\right) ^2}{\left( \bar{h}_1(c)\right) ^2}=\left( \bar{h}_n(c)\right) ^2. \end{aligned} \end{aligned}$$
(24)

Furthermore,

$$\begin{aligned} \begin{aligned} \hat{h}_n(c)&=\hat{h}_{n-1}(c)+\left( \bar{h}_n(c)\right) ^2\\&=\hat{h}_{n-2}(c)+\left( \bar{h}_{n-1}(c)\right) ^2+\left( \bar{h}_n(c)\right) ^2\\&=\hat{h}_0(c)+\left( \bar{h}_1(c)\right) ^2+\left( \bar{h}_2(c)\right) ^2+\cdots + \left( \bar{h}_{n-1}(c)\right) ^2+\left( \bar{h}_n(c)\right) ^2. \end{aligned} \end{aligned}$$
(25)

Recall that \(\bar{h}_n(c)=D^{-1/2}\left[ H_1^{n+2}-H_2^{n+2}\right] \), where \(D=c^2-2c-3\) (Theorem 4.1). Direct computation yields to \(H_1H_2=1\) and \(\bar{h}_n(c)^2=D^{-1}\left[ H_1^{2n+4}+H_2^{2n+4}-2\right] \). Replacing into (25) we obtain

$$\begin{aligned} \hat{h}_n(c)=\hat{h}_0(c)+\frac{1}{D} \left[ \frac{H_1^6}{1-H_1^2}(1-H_1^{2n})+\frac{H_2^6}{1-H_2^2}(1-H_2^{2n})-2n\right] . \end{aligned}$$

The following simplifications can be made also by direct computation:

$$\begin{aligned} \begin{aligned} P&=\frac{H_1^6}{1-H_1^2}+\frac{H_2^6}{1-H_2^2}=1-2c-3c^2+4c^3-c^4\\ \frac{H_1}{1-H_1^2}&=-\frac{1}{\sqrt{D}}\quad \frac{H_2}{1-H_2^2}=\frac{1}{\sqrt{D}}. \end{aligned} \end{aligned}$$

Using these simplifications and \(\hat{h}_0(c)=c^2-2c-2\) we finally get

$$\begin{aligned} \begin{aligned} \hat{h}_n(c)&=\hat{h}_0(c)+\frac{1}{D}\left[ P+\frac{1}{\sqrt{D}}\left( H_1^{2n+5}-H_2^{2n+5}\right) -2n\right] \\&=\frac{1}{D^{3/2}}\left[ H_1^{2n+5}-H_2^{2n+5}\right] -\frac{2n+5}{D} \end{aligned} \end{aligned}$$

which completes the proof of the theorem. \(\square \)

Example 5.1

By taking specific values of c in (23), we obtain the following interesting Hankel transform evaluations:

  1. 1.

    \(c=1\). The Hankel transform of \(m_{n+2}-2m_{n+1}+m_n\) is \((1,2,2,3,3,4,4,\ldots )\).

  2. 2.

    \(c=2\), \(c=0\). The Hankel transform of \(m_{n+2}\) and \(m_{n+2}-4m_{n+1}+4m_n\) is \((2,2,3,4,4,5,\ldots )\).

  3. 3.

    By direct evaluation using (23), it can be shown that \(\hat{h}_n(-c)=\hat{h}_n(2+c)\).

  4. 4.

    By taking a limit of (23) when \(c\rightarrow -1\), we find that the Hankel transform of \(m_{n+2}+2m_{n+1}+m_n\) is given by \(\hat{h}_n(-1)=(30 + 37 n + 15 n^2 + 2 n^3)/6\). The same sequence is obtained in the case \(c\rightarrow 3\), i.e., \(m_{n+2}-6m_{n+1}+9m_n\).

The special case \(c=0\), i.e., the Hankel transform of the shifted Motzkin numbers \(m^{**}_n=m_{n+2}\), also follows from [4, Corollary 4.2]. For the sake of completeness, we state it as a separate corollary.

Corollary 5.3

The Hankel transform of the sequence of shifted Motzkin numbers \(\left( m^{**}_n\right) _{n \in {\mathbb {N}}_0}\) is given by

$$\begin{aligned} h^{**}_n= {\left\{ \begin{array}{ll} \begin{aligned} 4k+2,\quad &{} n=6k \quad &{} \mathrm{or} \quad &{} n=6k+1 \\ 4k+3, \quad &{} n=6k+2 \\ 4k+4, \quad &{} n=6k+3 \quad &{} \mathrm{or} \quad &{} n=6k+4 \\ 4k+5, \quad &{} n=6k+5 \end{aligned} \end{array}\right. } (k \in {\mathbb {N}}_0). \end{aligned}$$
(26)

Note that the difference equation (22) is similar to the Eq. (20). However, due to the lack of one addend in the middle term, (22) can be solved analytically.

The following corollary gives the expressions for the three-term recurrence relation coefficients \(\hat{\alpha }_n\) and \(\hat{\beta }_n\), corresponding to the sequence \(m_{n+2}-2c \cdot m_{n+1}+c^2\cdot m_n\). These expressions will be further used in the following section.

Corollary 5.4

Coefficients \(\hat{\alpha }_n\) and \(\hat{\beta }_n\) are given by

$$\begin{aligned} \hat{\alpha }_n= & {} 1+\frac{(\bar{h}_{n+1}(c))^2- \bar{h}_{n}(c)\cdot \bar{h}_{n+2}(c)}{\bar{h}_n(c)\cdot \bar{h}_{n+1}(c)}\nonumber \\&+\frac{(\hat{h}_n(c))^2\cdot \bar{h}_{n-1}(c)\cdot \bar{h}_{n+1}(c)-(\bar{h}_n(c))^2\cdot \hat{h}_{n-1}(c)\cdot \hat{h}_{n+1}(c)}{\bar{h}_n(c)\cdot \bar{h}_{n+1}(c)\cdot \hat{h}_{n-1}(c)\cdot \hat{h}_{n}(c)} \end{aligned}$$
(27)
$$\begin{aligned} \hat{\beta }_n= & {} \frac{\hat{h}_n(c)\cdot \hat{h}_{n-2}(c)}{\left( \hat{h}_{n-1}(c)\right) ^2}. \end{aligned}$$
(28)

6 Another Linear Combination and Hankel Transform of \(m_{n+3}\)

Finally, consider the following linear combination of four consecutive Motzkin numbers

$$\begin{aligned} \breve{m}_n=m_{n+3}-3c\cdot m_{n+2}+3c^2\cdot m_{n+1}-c^3\cdot m_n \end{aligned}$$

which is the moment sequence of \(\breve{w}(x)=(x-c)^3w(x)=(x-c)\hat{w}(x)\). Denote its Hankel transform by \(\breve{h}_n(c)\). Proceeding similarly as in the previous section, we can show that \(\breve{h}_n(c)\) satisfies difference equation. This is demonstrated by the following theorem.

Theorem 6.1

The Hankel transform \(\breve{h}_n(c)\) of the sequence

$$\begin{aligned} \left( \breve{m}_n\right) _{n \in {\mathbb {N}}_0}=\left( m_{n+3}-3c\cdot m_{n+2}+3c^2\cdot m_{n+1}-c^3\cdot m_n\right) _{n \in {\mathbb {N}}_0} \end{aligned}$$

satisfies difference equation

$$\begin{aligned}&\left[ \left( \hat{h}_{n-1}(c)\right) ^2\cdot \bar{h}_n(c)\right] \cdot \breve{h}_n(c) -\left[ \bar{h}_{n+1}(c)\cdot \left( \hat{h}_{n-1}(c)\right) ^2\right. \nonumber \\&\quad \left. + \bar{h}_{n-1}(c)\cdot \left( \hat{h}_n(c)\right) ^2\right] \cdot \breve{h}_{n-1}(c)+ \bar{h}_n(c)\cdot \left( \hat{h}_n(c)\right) ^2\cdot \breve{h}_{n-2}(c)=0, \end{aligned}$$
(29)

with the initial values: \(\breve{h}_0(c)=4-6c+3c^2-c^3\) and \(\breve{h}_1(c)=3-18c+21c^2-20c^3+15c^4-6c^5+c^6\).

Proof

We start with the transformation

$$\begin{aligned} \breve{w}(x)=(x-c)^3\cdot w(x)=(x-c)\cdot \hat{w}(x) \end{aligned}$$

and apply Lemma 3.3. The coefficients \(\breve{\alpha }_n\) and \(\breve{\beta }_n\) are equal to

$$\begin{aligned} \breve{\alpha }_n= & {} \hat{\alpha }_{n+1}+\breve{r}_{n+1}-\breve{r}_n, \quad n\ge 0, \end{aligned}$$
(30)
$$\begin{aligned} \breve{\beta }_0= & {} \int ^3_{-1}\breve{w}(x)dx=4-6c+3c^2-c^3, \quad \nonumber \\ \breve{\beta }_n= & {} \hat{\beta }_n \cdot \frac{\breve{r}_n}{\breve{r}_{n-1}}=\frac{\bar{r}_n}{\bar{r}_{n-1}}\cdot \frac{\hat{r}_n}{\hat{r}_{n-1}}\cdot \frac{\breve{r}_n}{\breve{r}_{n-1}}, \quad n\ge 1. \end{aligned}$$
(31)

The sequence \(\left( \breve{r}_n\right) _{n \in {\mathbb {N}}_0}\) is determined by

$$\begin{aligned} \breve{r}_n=c-\hat{\alpha }_n-\frac{\hat{\beta }_n}{\breve{r}_{n-1}}, \quad n\ge 1, \end{aligned}$$
(32)

with the initial value equal to

$$\begin{aligned} r_0=c-\hat{\alpha }_0=\frac{c^2-2c+(c^2-2c+2)^2}{(c-1)(c^2-2c+2)}. \end{aligned}$$

According to the previous expression and the Heilermann formula (4) we have

$$\begin{aligned} \frac{\breve{h}_n(c)}{\breve{h}_{n-1}(c)}=- \frac{\hat{h}_n(c)}{\hat{h}_{n-1}(c)}\cdot \breve{r}_n, \end{aligned}$$

which implies

$$\begin{aligned} \breve{r}_n=-\frac{\hat{h}_{n-1}(c)\cdot \breve{h}_n(c)}{\hat{h}_n(c)\cdot \breve{h}_{n-1}(c)}. \end{aligned}$$
(33)

Now by replacing (33) and (27)–(28) (Corollary 5.4) into (32), we obtain (29). \(\square \)

As the special case, we give closed-form evaluation of the Hankel transform of \(\left( m_{n+3}\right) _{n \in {\mathbb {N}}_0}\). This is done by the following theorem.

Theorem 6.2

The Hankel transform of the sequence \(\left( m_{n+3}\right) _{n \in {\mathbb {N}}_0}\) is given by

$$\begin{aligned} h^{***}_n= {\left\{ \begin{array}{ll} \begin{array}{ll} 4(2k+1)^2,&{} \quad n=6k \\ (2k+1)(4k+3),&{} \quad n=6k+1 \\ -2(k+1)(4k+3),&{} \quad n=6k+2 \\ -16(k+1)^2,&{} \quad n=6k+3 \\ -2(k+1)(4k+5),&{} \quad n=6k+4 \\ (4k+5)(2k+3),&{} \quad n=6k+5 \end{array} \end{array}\right. } (k \in {\mathbb {N}}_0). \end{aligned}$$
(34)

Proof

By putting \(c=0\) in (29), we get

$$\begin{aligned}&\left[ \left( h^{**}_{n-1}\right) ^2\cdot h^*_n\right] \cdot h^{***}_n -\left[ h^*_{n+1}\cdot \left( h^{**}_{n-1}\right) ^2+h^*_{n-1}\cdot \left( h^{**}_n\right) ^2\right] \cdot h^{***}_{n-1}\nonumber \\&\quad +h^*_n\cdot \left( h^{**}_n\right) ^2\cdot h^{***}_{n-2}=0. \end{aligned}$$
(35)

Denote by

$$\begin{aligned} h^{***}_{i,k}=h^{***}_{6k+i}, \quad i\in \{0,1,\ldots ,5\}, \quad k\in {{\mathbb {N}}_0}. \end{aligned}$$
(36)

Equation (35) now reduces to

$$\begin{aligned} {\left\{ \begin{array}{ll} \begin{aligned} &{}(4k+2)^2\cdot h^{***}_{2,k}-(4k+2)^2\cdot h^{***}_{1,k}+(4k+3)^2\cdot h^{***}_{0,k}=0\\ &{}(4k+3)^2\cdot h^{***}_{3,k}-(4k+4)^2\cdot h^{***}_{2,k}+(4k+4)^2\cdot h^{***}_{1,k}=0\\ &{}h^{***}_{4,k}-h^{***}_{3,k}+h^{***}_{2,k}=0\\ &{}(4k+4)^2\cdot h^{***}_{5,k}-(4k+4)^2\cdot h^{***}_{4,k}+(4k+45)^2\cdot h^{***}_{3,k}=0\\ &{}(4k+5)^2\cdot h^{***}_{0,k+1}-(4k+6)^2\cdot h^{***}_{5,k}+(4k+6)^2\cdot h^{***}_{4,k}=0\\ &{}h^{***}_{1,k+1}-h^{***}_{0,k+1}+h^{***}_{5,k}=0. \end{aligned} \end{array}\right. } \end{aligned}$$
(37)

Recall that expressions for \(h_n^*\) and \(h_n^{**}\) are given by (14) and (26), respectively. The solution of the previous system is given by

$$\begin{aligned} h^{***}_{0,k}= & {} 4(2k+1)^2, \quad h^{***}_{1,k}=(2k+1)(4k+3), \quad h^{***}_{2,k}=-2(k+1)(4k+3),\\ h^{***}_{3,k}= & {} -16(k+1)^2, \quad h^{***}_{4,k}=-2(k+1)(4k+5), \quad h^{***}_{5,k}=(2k+3)(4k+5), \end{aligned}$$

which can be proved by mathematical induction. \(\square \)

7 Summary

At the end of the paper, we summarize the new Hankel transform evaluations in the following table.

Sequence

Dif. eq.

Closed-form expr.

\(m_{n+1}-c \cdot m_n\)

(13)

(9)

\(m_{n+2}-a \cdot m_{n+1} + b \cdot m_n\)

(16)

(spec. cases)

\(m_{n+2}-c \cdot m_{n+1}\)

(20)

(21), for \(c=-1\)

\(m_{n+2}-2c\cdot m_{n+1} + c^2 \cdot m_n\)

(22)

(23)

\(m_{n+3}-3c\cdot m_{n+2}+3c^2\cdot m_{n+1}-c^3\cdot m_n\)

(29)

(spec. cases)

\(m_{n+3}\)

(35)

(34)

Hankel transform evaluation of the general form of the second, third, and fifth sequence are left as the open problems.