<figure><img src="image_1.png" /></figure>

HAL
open science

Continued fractions for $q$-deformed real numbers,
$\{-1, 0, 1\}$-Hankel determinants, and
Somos-Gale-Robinson sequences

Valentin Ovsienko, Emmanuel Pedon

► To cite this version:

Valentin Ovsienko, Emmanuel Pedon. Continued fractions for $q$-deformed real numbers, $\{-1, 0, 1\}$-Hankel determinants, and Somos-Gale-Robinson sequences. Advances in Applied Mathematics, 2024, 162, pp.102788. 10.1016/j.aam.2024.102788. hal-04366703v2

HAL Id: hal-04366703

https://hal.science/hal-04366703v2

Submitted on 29 Sep 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
CONTINUED FRACTIONS FOR *q*-DEFORMED REAL NUMBERS,
{−1, 0, 1}-HANKEL DETERMINANTS,
AND SOMOS-GALE-ROBINSON SEQUENCES

VALENTIN OVSIENKO AND EMMANUEL PEDON

ABSTRACT. *q*-deformed real numbers are power series with integer coefficients. We study Stieltjes and Jacobi type continued fraction expansions of *q*-deformed real numbers and find many new examples of such continued fractions. We also investigate the corresponding sequences of Hankel determinants and find an infinite family of power series for which several of the first sequences of Hankel determinants consist of −1, 0 and 1 only. These Hankel sequences satisfy Somos and Gale-Robinson recurrences.

CONTENTS

<table><tbody><tr><td>1. Introduction and main results</td><td>2</td></tr><tr><td>1.1. Continued fractions: classical examples</td><td>2</td></tr><tr><td>1.2. q-reals: examples and ideas</td><td>4</td></tr><tr><td>1.3. Hankel determinants</td><td>7</td></tr><tr><td>1.4. Somos and Gale-Robinson recurrences</td><td>9</td></tr><tr><td>2. q-deformed real numbers</td><td>11</td></tr><tr><td>2.1. q-deformed continued fractions</td><td>11</td></tr><tr><td>2.2. PSL(2, Z)-invariance</td><td>13</td></tr><tr><td>2.3. The gap theorem</td><td>14</td></tr><tr><td>2.4. The metallic irrationals</td><td>15</td></tr><tr><td>3. q-irrationals and super δ-fractions</td><td>17</td></tr><tr><td>3.1. Super δ-fractions and H-fractions</td><td>17</td></tr><tr><td>3.2. Super δ-fractions of metallic q-numbers</td><td>18</td></tr><tr><td>3.3. H-fractions for the golden ratio</td><td>19</td></tr><tr><td>3.4. H-fractions for the silver ratio</td><td>20</td></tr><tr><td>4. Hankel determinants of q-metallic numbers</td><td>21</td></tr><tr><td>4.1. Shifted Hankel determinants</td><td>21</td></tr><tr><td>4.2. The case of golden ratio. Proof of Theorems 1.6 and 1.7</td><td>22</td></tr><tr><td>4.3. The case of silver ratio. Proof of Theorem 1.8</td><td>24</td></tr><tr><td>4.4. The case of y<sub>3</sub> and y<sub>4</sub>: more rows of −1, 0, 1</td><td>25</td></tr><tr><td>4.5. The Somos-4, Somos-6 and Gale-Robinson recurrences</td><td>26</td></tr></tbody></table>

Final version. To appear in Adv. in Appl. Math.

Date: 2024-09-19.

2020 Mathematics Subject Classification. Primary: 05A30, 11A55. Secondary: 11B37, 11C20, 37J70.

Key words and phrases. Hankel determinants, *q*-analogues, quadratic irrationals, continued fractions, Somos and Gale-Robinson sequences.
5. Miscellaneous examples of continued fractions for $q$-numbers 27

5.1. Another J-fraction for the silver ratio 27

5.2. A Stieltjes type formula for $S^{(2)}(q)$ 27

5.3. C-fractions for the $q$-integers 28

5.4. C-fractions for $q$-rationals 29

References 29

# 1. INTRODUCTION AND MAIN RESULTS

In this paper we study power series with integral coefficients that represent so-called $q$-deformed real numbers, or “$q$-reals” for short. We calculate the sequences of Hankel determinants of the simplest examples. It turns out that (conjecturally) there exists a remarkable infinite family of $q$-reals that have a surprising property: several first sequences of their Hankel determinants are periodic and consist of $-1, 0$ and $1$ only. This property is similar to that of the generating functions of Catalan and Motzkin numbers, but the number of $\{-1, 0, 1\}$-sequences is greater. Moreover, the obtained $\{-1, 0, 1\}$-Hankel sequences enjoy very special Somos and Gale-Robinson recurrences related to integrable dynamics.

The initial definition of $q$-reals [30] relies on continued fractions which are not of the Stieltjes or Jacobi type. One of our goals is to rewrite these series in the form of C-fractions and J-fractions which is most close to the classical Stieltjes and Jacobi continued fractions. In particular, we use the special class of Jacobi type continued fractions, called H-fractions, that was introduced and studied in [17]. The problem remains open in general, we solve it in particular cases.

## 1.1. Continued fractions: classical examples.
The following special class of continued fractions depending on one (formal) variable, that we denote $q$, are classically called *C-fractions*

$$ (1.1) \qquad f(q) = \frac{b_0}{1 - \frac{b_1 q^{p_1}}{1 - \frac{b_2 q^{p_2}}{\ddots}}} $$

Here $p = (p_1, p_2, \dots)$ is a sequence of integers, $p_i \ge 1$, and $b = (b_0, b_1, b_2, \dots)$ is a sequence of (real or complex) coefficients, such that $b_i \ne 0$ for all $i \ge 0$. When $p_i \equiv 1$, the C-fraction (1.1) is a classical Stieltjes continued fraction [38], which is also called a *regular C-fraction*, or an *S-fraction*; see [10, 40] where combinatorial properties of continued fractions were studied. Given a power series

$$ f(q) = \sum_{i=0}^{\infty} f_i q^i, $$

it can always be written as a C-fraction in a unique way [26]. For an explicit algorithm, see [37]. C-fractions were extensively studied and applied to many sequences of integers; see, e.g. [2, 7, 9, 14, 22, 23, 26, 37] and references therein.
The generalized Jacobi continued fractions, or *J-fractions*, are of the form

$$ (1.2) \qquad f(q) = \frac{b_0}{1 + qA_1(q) - \frac{b_1q^{p_1}}{1 + qA_2(q) - \frac{b_2q^{p_2}}{\ddots}}} $$

where $A_i(q)$ are polynomials with $\deg(A_i) < p_i - 1$. When $p_i \equiv 2$, (1.2) is the classical Jacobi continued fraction, or *regular J-fraction*. As mentioned, every power series can be written in the form (1.1), but a more flexible form (1.2) may be simpler and have more symmetries. The counterpart is that such a fraction does not always exist for a given series. Combinatorial theory of J-fractions was founded in [10, 40]. For a modern theory and applications, see [22, 23, 17, 18].

The *Catalan numbers* $C_n = 1, 1, 2, 5, 14, 42, \dots$ are related to the simplest example of regular C-fraction. Indeed, the generating function

$$ C(q) = \sum_{i=0}^{\infty} C_n q^n = \frac{1 - \sqrt{1 - 4q}}{2q} $$

has the continued fraction expansion

$$ C(q) = \frac{1}{1 - \frac{q}{1 - \frac{q}{\ddots}}} $$

see e.g. [1]. Here and thereafter the *generating function* of a series is a function whose Taylor expansion at 0 coincides with the series. Abusing the notation, we will often identify series, the corresponding generating functions, and continued fractions. We will use the same notation for all of them.

Note also that the “shifted series” $\frac{C(q)-1}{q}$ has the following J-fraction expansion

$$ \frac{C(q) - 1}{q} = \frac{1}{1 - 2q - \frac{q^2}{1 - 2q - \frac{q^2}{\ddots}}} $$

The *Motzkin numbers* $M_n = 1, 1, 2, 4, 9, 21, 51, \dots$ is another classical example. The generating function

$$ M(q) = \frac{1 - q - \sqrt{(1 + q)(1 - 3q)}}{2q^2} = \frac{1}{q} C\left(\frac{q}{1 + q}\right) $$
can be written as continued fractions

$$ M(q) = \frac{1}{1 - \frac{q}{1 - \frac{q}{1 - \frac{q^2}{1 - \frac{q}{1 - \frac{q^2}{\ddots}}}}}} = \frac{1}{1 - q - \frac{q^2}{1 - q - \frac{q^2}{\ddots}}} $$

Note that the second formula (that can be found in [5]) is the simplest example of a regular J-fraction, while the first one is a very nice example of C-fraction.

1.2. **q-reals: examples and ideas.** The classical q-deformed integers are defined for $n \in \mathbb{Z}_{>0}$ by

$$ (1.3) \qquad [n]_q := 1 + q + q^2 + \cdots + q^{n-1} = \frac{1-q^n}{1-q} $$

They arose in the works of Euler and Gauss and play important role in combinatorics and mathematical physics. The notion of q-deformed rationals [29] and, more generally, that of q-deformed real numbers [30] extends q-integers. Given $x \in \mathbb{R}$, the q-deformation $[x]_q$ is a series in $q$ with integer coefficients. A fundamental property of q-reals is PSL(2, $\mathbb{Z}$)-invariance; see [24]. Analytic properties of the series defining q-deformed real numbers were studied in [25].

The simplest example of q-deformed irrational number is the q-deformation of $\varphi = \frac{1+\sqrt{5}}{2}$, called the “golden ratio”. This q-deformation will be denoted by $G(q)$ (instead of $[\varphi]_q$ as in [30]). It is given by the series

$$ (1.4) \qquad \begin{aligned} G(q) := & 1 + q^2 - q^3 + 2q^4 - 4q^5 + 8q^6 - 17q^7 + 37q^8 - 82q^9 \\ & + 185q^{10} - 423q^{11} + 978q^{12} - 2283q^{13} + 5373q^{14} - 12735q^{15} \\ & + 30372q^{16} - 72832q^{17} + 175502q^{18} - 424748q^{19} + 1032004q^{20} \dots \end{aligned} $$

see [30]. Note that the coefficients of this series are quite close to the sequence A004148; see [35]. The differences are the zero linear term in (1.4) and the alternating signs. The series A004148 belongs to the class of sequences called in [5] the “generalized Catalan numbers”<fnref n="1" />. It is connected to the Narayana triangle and has interesting combinatorial interpretations; see [6].

The generating function of the series (1.4) is

$$ (1.5) \qquad G(q) = \frac{q^2 + q - 1 + \sqrt{(1 - q + q^2)(1 + 3q + q^2)}}{2q} $$

Similarly to the Motzkin case, the function $G(q)$ can be obtained from the generating function of the Catalan numbers:

$$ G(q) = 1 + q - \frac{q}{1 + q + q^2} C\left(\frac{q^2}{(1 + q + q^2)^2}\right) $$

<footnote n="1">¹Note however that there are many other sequences known under this name.</footnote>
(see [5] for a similar expression). The series (1.4) and its shifts have nice continued fraction expansions that have close resemblance with the Catalan and Motzkin continued fractions.

**Proposition 1.1.** The series (1.4) is represented by the following 2-periodic C-fraction

$$ (1.6) \qquad G(q) = \frac{1}{1 - \frac{q^2}{1 + \frac{q}{1 - \frac{q^2}{1 + \frac{q}{\ddots}}}}} $$

It turns out that the series (1.4) is also related to another, 3-periodic, C-fraction. Let us introduce the following notation for the shifted series

$$ (1.7) \qquad G^{(1)}(q) := \frac{G(q) - 1}{q}, \qquad G^{(2)}(q) := \frac{G(q) - 1}{q^2}, \qquad G^{(3)}(q) := \frac{G(q) - 1 - q^2}{q^3}, $$

that will be useful in the sequel. Note that the series $G^{(2)}(q)$ corresponds precisely to the sequence in the first column of A123634; see [35].

**Proposition 1.2.** One has

$$ (1.8) \qquad G^{(2)}(q) = \frac{1}{1 + \frac{q}{1 + \frac{q}{1 + \frac{q^3}{1 + \frac{q}{1 + \frac{q}{1 + \frac{q^3}{1 + \frac{q^5}{\ddots}}}}}}} $$

The $q$-deformed golden ratio seems to be an inexhaustible source of beautiful continued fractions. Let us give two more formulas.

**Proposition 1.3.** One has the following 2-periodic continued J-fraction

$$ (1.9) \qquad G^{(2)}(q) = \frac{1}{1 + q - \frac{q^2}{1 + q + \frac{q^3}{1 + q - \frac{q^2}{1 + q + \frac{q^3}{\ddots}}}}} $$

Despite their simplicity, we did not find the C-fractions (1.6) and (1.8) nor the J-fraction (1.9) in the literature. Their proofs will readily follow from the functional equations (2.13) and (2.14) for the generating functions $G(q)$ and $G^{(2)}(q)$.
Alternatively, the series $G^{(2)}(q)$ can be represented by a 1-periodic J-type continued fraction which is a particular case of Theorem 3.2.

**Proposition 1.4.** *One has*

$$ (1.10) \qquad G^{(2)}(q) = \frac{1}{1 + q - q^2 + \frac{q^3}{1 + q - q^2 + \frac{q^3}{\ddots}}} $$

Note that the connection between the continued fraction (1.10) and the sequence A004148 was observed in [6].

We will see in Section 3.2 that (1.10) belongs to the interesting class of *super δ-fractions* introduced and studied in [17]. When $\delta = 2$, they are called H-fractions and used to compute Hankel determinants. They are particularly efficient in the case where some of the Hankel determinants associated with the series vanish.

We will also show that, unlike (1.6), (1.8), and (1.9), the expression (1.10) can be generalized to the infinite family of $q$-deformed “metallic numbers”. Recall that these numbers are the irrationals $y_n$ ($n \in \mathbb{Z}_{>0}$) defined by the following 1-periodic regular continued fraction:

$$ (1.11) \qquad y_n = [n, n, n, \dots] = n + \frac{1}{n + \frac{1}{n + \frac{1}{\ddots}}} = \frac{n + \sqrt{n^2 + 4}}{2} $$

In Theorem 3.2, we shall see that the $q$-deformation $[y_n]_q$ of any metallic number $y_n$ admits a 1-periodic super $\delta$-fraction. For the golden ratio $y_1 = \frac{1+\sqrt{5}}{2} = \phi$, this is simply formula (1.10) since $[y_1]_q = G(q) = 1 + q^2 G^{(2)}(q)$.

The next metallic number is $y_2 = \sqrt{2} + 1$ which is often called the “silver ratio”. The $q$-deformation $[y_2]_q$ is the series that starts as follows

$$ (1.12) \qquad S(q) = 1 + q + q^4 - 2q^6 + q^7 + 4q^8 - 5q^9 - 7q^{10} + 18q^{11} + 7q^{12} - 55q^{13} + 18q^{14} \\ + 146q^{15} - 155q^{16} - 322q^{17} + 692q^{18} + 476q^{19} - 2446q^{20} + 307q^{21} \dots $$

see [30]. This series was recently added to the OEIS; see Sequence A337589. Not much is known about it yet. The generating function of the series (1.12) is the function

$$ (1.13) \qquad S(q) = \frac{q^3 + 2q - 1 + \sqrt{(1 - q + q^2)(1 + q + 4q^2 + q^3 + q^4)}}{2q} $$

As in the case of the golden ratio, we will use the following notation for the shifted series

$$ (1.14) \qquad S^{(1)}(q) := \frac{S(q) - 1}{q}, \quad S^{(2)}(q) := \frac{S(q) - 1 - q}{q^2}, \\ S^{(3)}(q) := \frac{S(q) - 1 - q}{q^3}, \quad S^{(4)}(q) := \frac{S(q) - 1 - q}{q^4}. $$

Next statement is then the analogue of Proposition 1.4 for the series (1.12). It is a particular case of Theorem 3.2.
**Proposition 1.5.** We have

$$ (1.15) \qquad S^{(4)}(q) = \frac{1}{1 + 2q^2 - q^3 + \frac{q^5}{1 + 2q^2 - q^3 + \frac{q^5}{\ddots}}} $$

More continued fractions related to $S(q)$ will be presented in Section 3.4 and other examples of metallic $q$-numbers will be treated in Section 4.4.

**1.3. Hankel determinants.** Given a power series $f(q) = \sum_{i=0}^{\infty} f_i q^i$ or simply a sequence of numbers $f = (f_i)_{i \in \mathbb{Z}_{\ge 0}}$, the corresponding Hankel determinants are the determinants of the $n \times n$ matrices

$$ (1.16) \qquad \Delta_n^{(\ell)}(f) = \begin{vmatrix} f_\ell & f_{\ell+1} & \cdots & f_{\ell+n-1} \\ f_{\ell+1} & f_{\ell+2} & \cdots & f_{\ell+n} \\ \vdots & \vdots & & \vdots \\ f_{\ell+n-1} & f_{\ell+n} & \cdots & f_{\ell+2n-2} \end{vmatrix}, $$

where $\ell, n = 0, 1, 2, 3, \dots$, and where $\Delta_0^{(\ell)}(f) := 1$ by convention. These determinants are important characteristics of $f$ and appear in a variety of subjects. The number $\ell$ is called the “shift” of the determinant $\Delta_n^{(\ell)}(f)$. When $\ell = 0$, we use the notation $\Delta_n(f)$.

Let us recall the classical examples of the Catalan numbers, studied by Aigner in [2]. The first two sequences of Hankel determinants in this case are identically equal to 1, and the third Hankel sequence consists in all natural numbers:

$$ \Delta_n(C) = 1, 1, 1, \dots \qquad \Delta_n^{(1)}(C) = 1, 1, 1, \dots \qquad \Delta_n^{(2)}(C) = n + 1. $$

Note that the Hankel sequences $\Delta_n(C)$ and $\Delta_n^{(1)}(C)$ completely characterize the sequence of Catalan numbers.

Another classical example is that of the Motzkin numbers, also studied by Aigner in [3]. In this case, the first sequence of Hankel determinants is still identically 1, while the second is 3-antiperiodic (and thus 6-periodic) and consists of $-1, 0$, and $1$:

$$ \Delta_n(M) = 1, 1, 1, \dots \qquad \Delta_n^{(1)}(M) = 1, 1, 0, -1, -1, 0, \dots $$

for $n = 0, 1, 2, 3, \dots$. The third sequence of Hankel determinants of the Motzkin numbers is

$$ \Delta_n^{(2)}(M) = 1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, \dots $$

It is classical that, whenever $f(q)$ can be written as a regular C-fraction or a regular J-fraction, the determinants $\Delta_n(f)$ can be calculated explicitly; see, e.g. [22, 23]. Much work has been done to generalize these classical results to the cases of more general continued fractions such as (1.1) and (1.2); see, e.g. [9, 14, 17, 18, 37]. We will try to adopt these results in our situation, although this is not always straightforward. Our proofs are based on the notion of H-fractions of [17].

Sequences with Hankel determinants consisting of $0, 1$ and $-1$ were considered in [8, 5, 6, 41]; according to [8] the question of characterization of such sequences was asked by Michael Somos. We contribute to this study.

In Section 4.2 we will prove the following property of the $q$-deformed golden ratio (1.4).
**Theorem 1.6.** (1) The first four forward shifted sequences of Hankel determinants corresponding to the series $G(q)$ of the q-golden number (1.4) are 4-antiperiodic

$$ \Delta_{n+4}^{(\ell)}(G) = -\Delta_{n}^{(\ell)}(G), \quad \ell = 0, 1, 2, 3, $$
(and thus 8-periodic) and consist of 0, 1, and -1 only. The sequences start as follows

$$ \begin{array}{l} \Delta_n(G) = 1, \quad 1, \quad 1, \quad 0, \quad -1, \quad -1, \quad -1, \quad 0, \quad \dots \\ \Delta_n^{(1)}(G) = 1, \quad 0, \quad -1, \quad 1, \quad -1, \quad 0, \quad 1, \quad -1, \quad \dots \\ \Delta_n^{(2)}(G) = 1, \quad 1, \quad 1, \quad 0, \quad -1, \quad -1, \quad -1, \quad 0, \quad \dots \\ \Delta_n^{(3)}(G) = 1, \quad -1, \quad 0, \quad 0, \quad -1, \quad 1, \quad 0, \quad 0, \quad \dots \end{array} \tag{1.17} $$

for $n = 0, 1, 2, 3, \dots$.

(2) The first three rows above are interconnected: for all $n$,

$$ \Delta_n(G) = (-1)^n \Delta_{n-2}^{(1)}(G) = \Delta_n^{(2)}(G). $$

The first formula in (1.17) is not completely new; see Sequence A123634. Sequences with generating function satisfying quadratic functional equations similar to our main examples were studied in [41, 5, 7, 13] and [21].

The sequences of Hankel determinants $\Delta_n^{(\ell)}(G)$ with $\ell \ge 4$ do not consist solely of 0, 1 and -1, but they form interesting patterns. For instance,

$$ (1.18) \qquad \Delta_n^{(4)}(G) = 1, 2, 0, -2, -3, -4, 0, 4, 5, 6, 0, -6, -7, -8, 0, 8, \dots $$

Observe a similarity with the Hankel sequence of the Motzkin numbers $\Delta_n^{(2)}(M)$.

We will prove in Section 4.2 that the series $G(q)$ (see (1.4)) is completely characterized by the first four sequences of Hankel determinants. More precisely, we have the following statement.

**Theorem 1.7.** The series $G(q)$ is the only series with Hankel determinants as in (1.17).

Note that this kind of statements is obvious when the sequences of Hankel determinants contain no zero entries, for instance the sequence of Catalan numbers is characterized by the first two sequences of Hankel determinants consisting of 1's. With presence of zeros the situation is more complicated.

For our second main example of silver ratio $S(q)$ (see (1.12)), we have the following result that will be proved in Section 4.3.

**Theorem 1.8.** (1) The first four sequences of Hankel determinants corresponding to the series $S(q)$ of the q-silver number are periodic with period 12

$$ \Delta_{n+12}^{(\ell)}(S) = \Delta_n^{(\ell)}(S), \quad \ell = 0, 1, 2, 3, $$
and consist in $-1, 0, 1$ only. The sequences start as follows

$$ \begin{array}{l} \Delta_n(S) = 1, \quad 1, \quad -1, \quad -1, \quad 1, \quad 0, \quad -1, \quad 0, \quad 0, \quad 1, \quad 0, \quad -1, \quad \dots \\ \Delta_n^{(1)}(S) = 1, \quad 1, \quad 0, \quad -1, \quad 0, \quad 0, \quad -1, \quad 0, \quad 1, \quad 1, \quad -1, \quad -1, \quad \dots \\ \Delta_n^{(2)}(S) = 1, \quad 0, \quad 0, \quad -1, \quad 0, \quad 1, \quad -1, \quad -1, \quad 1, \quad 1, \quad -1, \quad 0, \quad \dots \\ \Delta_n^{(3)}(S) = 1, \quad 0, \quad -1, \quad -1, \quad 1, \quad 1, \quad -1, \quad -1, \quad 0, \quad 1, \quad 0, \quad 0, \quad \dots \end{array} \tag{1.19} $$
for $n = 0, 1, 2, 3, \dots$.

(2) These four rows are interconnected:

$$ \Delta_n^{(\ell+1)}(S) = (-1)^{n-1} \Delta_{n+3}^{(\ell)}(S) \quad \text{for } \ell = 0, 1, 2. $$

It turns out that the next sequence is also 12-periodic, $\Delta_{n+12}^{(4)}(S) = \Delta_n^{(4)}(S)$, with the following period

$$ \Delta_n^{(4)}(S) = 1, 1, -2, -1, 2, -1, -2, 1, 1, 0, 0, 0, \dots $$

This differs the series $S(q)$ from $G(q)$; cf. formula (1.18). The sequences $\Delta_n^{(\ell)}(S)$ with $\ell \ge 5$ seem to be aperiodic.

Although Theorem 1.8 is quite similar to Theorem 1.6, unlike the case of the golden ratio, we are unable to recover the sequence $S(q)$ from this information and do not know if this is the only series with Hankel determinants as in (1.19).

The number of Hankel sequences consisting of 0, 1, and $-1$ for the $q$-deformation of the metallic numbers $y_k$ defined by (1.11) seems to grow as $k$ grows; see Conjecture 1.9 below.

### 1.4. Somos and Gale-Robinson recurrences.
It is very easy to check that the first three sequences of Hankel determinants $\Delta_n(G)$, $\Delta_n^{(1)}(G)$, and $\Delta_n^{(2)}(G)$ (see (1.17)) satisfy the recurrence

$$ (1.20) \qquad \Delta_{n+4}\Delta_n = \Delta_{n+3}\Delta_{n+1} - \Delta_{n+2}^2. $$

Note also for comparison that the shifted Hankel sequence $\Delta_n^{(1)}(M)$ of the Motzkin numbers satisfies the recurrence $\Delta_{n+2}\Delta_n = \Delta_{n+1}^2 - 1$.

Recurrence (1.20) is (an instance of) the Somos-4 sequence, whose general form is

$$ a_{n+4}a_n = \alpha a_{n+3}a_{n+1} - \beta a_{n+2}^2, $$

for arbitrary parameters $\alpha, \beta$. This remarkable class of sequences was discovered by Michael Somos in the '80s. It remained unnoticed for some time and was disclosed by David Gale [15, 16]. Since then Somos sequences became very popular and were studied by many authors.

Relation between the Hankel determinants of sequences satisfying quadratic ("Catalan type") recurrences and Somos-4 sequences was discovered by Michael Somos who lectured about the subject in the fall of 2000 at MIT Stanley Seminar in Combinatorics. Somos conjectured, in general, the appearance of the Somos-4 sequence as the Hankel determinants of a quadratic type sequence (for the sequence A004148, see the Hankel determinant number wall A123634). This relation was rediscovered by Paul Barry and also conjectured in [5]. The first detailed proof of this conjecture was given in [13], a deep connection to (hyper)elliptic curves and generalizations were obtained in [21]. Recurrence (1.20) can be considered as a part of these results.

Besides, recurrence (1.20) has an interesting geometric interpretation. Taking independent variables $(x, y, z, t)$, it produces the map

$$ (x, y, z, t) \mapsto (y, z, t, \frac{yt - z^2}{x}), $$

which generates a 4-dimensional discrete dynamical system integrable in the sense of Liouville-Arnold; see [20, 12] and references therein. The first three Hankel sequences $\Delta_n(G)$, $\Delta_n^{(1)}(G)$, and $\Delta_n^{(2)}(G)$ thus correspond to periodic trajectories of the above map, or equivalently to periodic solutions of (1.20).
It is also easy to see that the first four sequences of Hankel determinants (1.19) satisfy the recurrence

$$ (1.21) \qquad \Delta_{n+6}\Delta_n = \Delta_{n+5}\Delta_{n+1} - \Delta_{n+3}^2, $$

which is a Somos-6 sequence. This statement is closely related to the results of Andrew Hone [21], since the quadratic recurrence for the coefficients of (1.12) fits into the class considered in this paper; see Eq. (4.22) in [21].

Let us conclude our introduction. A long series of computer experimentations lead us to the following conjecture.

**Conjecture 1.9.** Let $k$ be a positive integer, and for $\ell \in \mathbb{Z}_{\ge 0}$ let $\Delta_n^{(\ell)} := \Delta_n^{(\ell)}([y_k]_q)$ denote as in (1.16) the $\ell$-shifted sequence of Hankel determinants associated with the $q$-deformation of the metallic number $y_k$.

(a) The $k+2$ sequences $\Delta_n^{(0)}, \Delta_n^{(1)}, \dots, \Delta_n^{(k+1)}$ consist of $-1, 0, 1$ only, and they are $2k(k+1)$-periodic when $k$ is even and $2k(k+1)$-antiperiodic (hence $4k(k+1)$-periodic) when $k$ is odd:

$$ \Delta_{n+2k(k+1)}^{(\ell)} = (-1)^k \Delta_n^{(\ell)} \quad \text{for all } n \in \mathbb{Z}_{\ge 0}. $$

Moreover, all these sequences satisfy the recurrence

$$ (1.22) \qquad \Delta_{n+2k+2}^{(\ell)} \Delta_n^{(\ell)} = \Delta_{n+2k+1}^{(\ell)} \Delta_{n+1}^{(\ell)} - (\Delta_{n+k+1}^{(\ell)})^2 \quad \text{for all } n \in \mathbb{Z}_{\ge 0}. $$

(b) The $k+1$ pairs of consecutive shifted sequences $(\Delta_n^{(\ell)}, \Delta_n^{(\ell-1)})$ with $\ell = 1, 2, \dots, k+1$ are interconnected by the formula:

$$ \Delta_n^{(\ell)} = (-1)^{n+\frac{k(k+2\ell+1)}{2}} \Delta_{n+k+1}^{(\ell-1)} \quad \text{for all } n \in \mathbb{Z}_{\ge 0}. $$

Recurrence (1.22) is called the three-term Gale-Robinson recurrence; see [16, 11]. Integrability of the Gale-Robinson systems was proved by Fordy and Hone [12]. The Hankel determinants of $q$-deformed metallic numbers are, conjecturally, periodic $\{-1, 0, 1\}$-solutions of the corresponding discrete integrable systems.

The status of the conjecture is as follows. Theorems 1.6 and 1.8 confirm the conjecture for $k=1$ and $k=2$ (for arbitrary $n$). Applying Algorithms of [17] (Section 3), one can obtain computer assisted proofs for further small values of $k$, and this has been done for $k \le 8$ and $n \le 300$. More details for $k=3$ and $4$, and the explicit sequences of the Hankel determinants in these cases will be given in Section 4.4.

**Organization.** The paper is organized as follows.

In Section 2, we present the definition of $q$-reals and give a few examples. We follow [30, 29] and emphasize the continued fraction presentation. We also discuss the PSL(2, $\mathbb{Z}$)-invariance property. The family of $q$-deformed “metallic” irrationals is described with some details.

In Section 3, we develop the technique based on continued fractions. We use the notion of super $\delta$-fractions and H-fraction introduced in [17]. We consider the series of $q$-deformed metallic numbers and find their $\delta$-fraction presentation.

In Section 4, we prove Theorems 1.6, 1.7, and 1.8. We also calculate the first sequences of Hankel determinants for several other examples of metallic numbers and show that the phenomenon detected for $G(q)$ and $S(q)$ persists and is amplified. We demonstrate appearance of the recurrence (1.22). These results remain experimental for other metallic numbers.
The final Section 5 contains miscellaneous examples of continued fractions representing $q$-numbers. The general theory of C- and J-fraction presentation of $q$-numbers is yet to be developed.

## 2. $q$-DEFORMED REAL NUMBERS

In this section, we present the definition of $q$-deformed real numbers [29, 30] and give several examples. The main property of $q$-reals is that of PSL(2, $\mathbb{Z}$)-invariance [24]. Other important properties have recently been studied in [4, 33, 25, 31, 32, 34, 36].

**2.1. $q$-deformed continued fractions.** The original definition consists in $q$-deformation of continued fractions, but it is not of the form (1.1).

Given $x \in \mathbb{R}$, let us consider its standard continued fraction expansions

$$x = c_1 - \frac{1}{c_2 - \frac{1}{\ddots}} \quad \text{and} \quad x = a_1 + \frac{1}{a_2 + \frac{1}{\ddots}}$$

where $(c_1, c_2, \dots)$ and $(a_1, a_2, \dots)$ are sequences of integers such that $a_i \ge 1$ and $c_i \ge 2$, for all $i \ge 2$. The first continued fraction expansion is known under the name of Hirzebruch-Jung continued fraction (sometimes called the “negative”, “minus”, or “reversal” continued fraction), the second one is the most classical continued fraction expansion. We will use the notation

$$x = [[c_1, c_2, \dots]] \quad \text{and} \quad x = [a_1, a_2, \dots],$$

respectively. Note that the first notation is due to Hirzebruch. The coefficients $a_i$ and $c_j$ of the above expansions are connected by the Hirzebruch formula; see, e.g. [19, 28].

The above continued fractions are finite if and only if $x$ is rational and infinite (converging to $x$) when $x$ is irrational.

**Definition 2.1 ([29, 30]).** The $q$-analogue of $x$ is the formal series $[x]_q$ defined by any of the following (equal) continued fractions:

$$(2.1) \qquad [x]_q = [c_1]_q - \frac{q^{c_1-1}}{[c_2]_q - \frac{q^{c_2-1}}{\ddots}}$$

$$(2.2) \qquad = [a_1]_q + \frac{q^{a_1}}{[a_2]_{q^{-1}} + \frac{q^{-a_2}}{[a_3]_q + \frac{q^{a_3}}{[a_4]_{q^{-1}} + \frac{q^{-a_4}}{\ddots}}}}$$

where $[n]_q$ stands for the $q$-integer as in (1.3), and $[n]_{q^{-1}} = q^{1-n}[n]_q$ is the same expression with reciprocal parameter.
The continued fractions (2.1) and (2.2) coincide when $x$ is rational [29]. When $x$ is irrational, the convergence of the expansions (2.1) and (2.2) and their coincidence is guaranteed by the stabilization phenomenon highlighted in [30]. Note that, in the rational case, the second formula (2.2) was also suggested (independently and almost simultaneously) in [36]. Let us also mention that, when $x$ is rational, $[x]_q$ is a rational function in $q$ that has many nice properties, such as unimodality and total positivity; see [29, 32, 27, 33]. Another important property is that the $q$-deformation of any quadratic irrational number is necessarily periodic; see [24]. This will be observed in all the examples treated in our article.

**Remark 2.2.** The continued fraction (2.1) has the type of *Thron fraction*, or *T-fraction*; see [39]. Indeed, the degree of every numerator is equal to the degree of the preceding polynomial. Continued fractions of this type were used in various aspects of the theory of continued fractions and combinatorics, but they do not allow to calculate Hankel determinants.

**Example 2.3.** (a) The simplest example of a $q$-deformed irrational is the golden ratio $\phi = \frac{1+\sqrt{5}}{2}$ already discussed in the introduction. The regular continued fraction of the golden ratio is $\phi = [1, 1, 1, \dots]$, and the Hirzebruch-Jung expansion is $\phi = [2, 3, 3, 3, \dots]$. Recall that the $q$-deformation of $\phi$ was denoted by $G(q)$. Formulas (2.1) and (2.2) then read

$$ (2.3) \qquad \begin{aligned} G(q) &= 1 + q - \frac{q}{1 + q + q^2 - \frac{q^2}{1 + q + q^2 - \frac{q^2}{\ddots}}} \\ &= 1 + \frac{q^2}{q + \frac{1}{1 + \frac{q^2}{q + \frac{1}{\ddots}}}} \end{aligned} $$

The explicit power series is as in (1.4).

(b) The regular continued fraction of the silver ratio $y_2$ is 1-periodic: $y_2 = [2, 2, 2, \dots]$, and the Hirzebruch-Jung expansion has period 2: $y_2 = [3, 2, 4, 2, 4, 2, 4, \dots]$. The $q$-deformation $S(q)$
is then given by the series represented by the following 2-periodic continued fractions

$$
\begin{align}
S(q) &= [3]_q - \frac{q^2}{1 + q - \frac{q}{1 + q + q^2 + q^3 - \frac{q^3}{1 + q - \frac{q}{\ddots}}}} \tag{2.4} \\
&= 1 + q + \frac{q^4}{q + q^2 + \frac{1}{1 + q + \frac{q^4}{q + q^2 + \frac{1}{\ddots}}}} \nonumber
\end{align}
$$

(c) The formula for the power series $[\sqrt{2}]_q$ can be deduced from (2.4) with the help of the recurrence formula (2.7) below, since $[\sqrt{2}]_q = S^{(1)}(q)$.

(d) For more examples, see [30, 24].

Clearly, the continued fractions (2.3), (2.4), and more generally (2.1) and (2.2), are neither C-fractions nor J-fractions, since the powers of q in the numerators are not high enough. Rewriting one of the fractions (2.1) or (2.2) in the form (1.1) and/or (1.2) is a challenging open problem.

2.2. PSL(2, $\mathbb{Z}$)-invariance. Modular invariance, i.e., PSL(2, $\mathbb{Z}$)-invariance is the main property of $q$-numbers. It can be used as an equivalent (and perhaps more conceptual) definition, comparing to Definition 2.1.

The group $\mathrm{SL}(2, \mathbb{Z})$ is the group of unimodular matrices with integer coefficients

$$
M = \begin{pmatrix} r & v \\ s & u \end{pmatrix}, \quad r, v, s, u \in \mathbb{Z}, \quad ru - vs = 1.
$$

It acts on $\mathbb{R} \cup \{\infty\}$ by linear-fractional transformations:

$$
(2.5) \qquad M \cdot x = \frac{rx + v}{sx + u}.
$$

This action is effective for the modular group PSL(2, $\mathbb{Z}$), which is the quotient of SL(2, $\mathbb{Z}$) by its center $\{\pm\mathrm{Id}\}$. It can be generated by two elements, and the standard choice of generators is

$$
T = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}, \quad S = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}
$$

with the relations $S^2 = (TS)^3 = \mathrm{Id}$.

As in [29, 24], consider the following matrices depending on $q$

$$
(2.6) \qquad T_q = \begin{pmatrix} q & 1 \\ 0 & 1 \end{pmatrix}, \quad S_q = \begin{pmatrix} 0 & -1 \\ q & 0 \end{pmatrix}.
$$
Viewed as elements of PGL(2, $\mathbb{Z}[q, q^{-1}]$), the matrices $T_q$ and $S_q$ satisfy the same relations as $T$ and $S$, namely $S_q^2 = (T_q S_q)^3 = \text{Id}$. Therefore, they generate a representation

$$ \rho : \text{PSL}(2, \mathbb{Z}) \to \text{PGL}(2, \mathbb{Z}[q, q^{-1}]), $$

and hence an action on the space $\mathbb{Z}((q)) \cup \{\infty\}$ of formal Laurent series in $q$ defined by linear-fractional transformations as in formula (2.5). PSL(2, $\mathbb{Z}$)-invariance then reads

$$ [M \cdot x]_q = \rho(M) \cdot [x]_q. $$

Since the linear-fractional action (2.5) is transitive on $\mathbb{Q} \cup \{\infty\}$, one can understand $q$-rationals as an orbit of one point, that can be chosen $[0]_q = 0$, or $[1]_q = 1$, etc. under the PSL(2, $\mathbb{Z}$)-action on $\mathbb{Z}((q)) \cup \{\infty\}$ defined by (2.6).

Using the generators (2.6), this can be stated as recurrence relations

$$ (2.7) \qquad [x+1]_q = q[x]_q + 1 \qquad \left[-\frac{1}{x}\right]_q = -\frac{1}{q[x]_q}, $$

and when $x \in \mathbb{Q}$, these relations suffice to determine the rational function $[x]_q$ if we know that $[0]_q = 0$. Formulas (2.1) and (2.2) readily follow from the PSL(2, $\mathbb{Z}$)-invariance, at least for rational $x$. Indeed, if $x = [c_1, c_2, \dots, c_n]$ then

$$ [x]_q = T_q^{c_1} S_q T_q^{c_2} S_q \cdots T_q^{c_n} \cdot 0, $$

hence (2.1). The second formula (2.2) involving the regular continued fraction can be deduced in a similar way; see [24].

A straightforward generalization of the first formula in (2.7) will be of interest:

$$ (2.8) \qquad [x+k]_q = q^k [x]_q + [k]_q \quad (x \in \mathbb{R}, k \in \mathbb{Z}_{\ge 0}). $$

Let us also mention that the above PSL(2, $\mathbb{Z}$)-invariance can be understood as invariance with respect to the Burau representation of the braid group $B_3$; see [4, 31].

**2.3. The gap theorem.** We give a refined form of the “gap theorem” which was proved in [30].

**Theorem 2.4.** If $k \le x < k + \frac{1}{n}$ for some $k \in \mathbb{Z}_{\ge 0}$ and $n \in \mathbb{Z}_{>0}$, then the series $[x]_q$ starts as follows

$$ [x]_q = [k]_q + q^{k+n} + \kappa_{k+n+1} q^{k+n+1} + \dots $$

i.e., if $k \ge 1$,

$$ [x]_q = 1 + q + \dots + q^{k-1} + q^{k+n} + \kappa_{k+n+1} q^{k+n+1} + \dots $$

where $\kappa_i$ are some integer coefficients.

*Proof.* The case $n = 1$ was proved in [30] (see Theorem 2). Using (2.8), this implies that, if $-n-1 \le x < -n$, then $[x]_q$ is of the form

$$ [x]_q = -q^{-n-1} (1 + \alpha_1 q + \alpha_2 q^2 + \dots) $$

with $\alpha_i$ integers. Applying the second equation in (2.7), we conclude that if $0 \le x < \frac{1}{n}$, then

$$ [x]_q = q^n (1 + \beta_1 q + \beta_2 q^2 + \dots) $$

with $\beta_i$ integers. The result follows applying again (2.8). $\square$
One can observe the gaps of length 1 and 2 in the examples (1.4) and the series $[\delta]_q$ after (2.4), respectively.

The gap theorem will be important for the sequel. In particular, it implies that the expression

$$ (2.9) \qquad \sigma_q(x) := \frac{[x-k]_q}{q} = \frac{[x]_q - [k]_q}{q^{k+1}} \quad (\text{when } k \le x < k+1) $$

is still a power series. It turns out that these “shifted series” have better continued fraction expansions; formulas (1.2) and (1.4) give two such examples, others will be obtained in Section 3.2.

**2.4. The metallic irrationals.** Our main examples of $q$-reals are $q$-deformations of the “metallic numbers” $y_k$ defined in (1.11).

**Proposition 2.5.** For any integer $n$, let $y_n = \frac{n+\sqrt{n^2+4}}{2} = [n, n, n, \dots]$ be the $n$-th metallic number. Its $q$-deformation $[y_n]_q$ is characterized by the following functional equation

$$ (2.10) \qquad q[y_n]_q^2 + ((1+q^n)(1-q) - q[n]_q)[y_n]_q = 1. $$

*Proof.* By definition (2.2), the $q$-deformation $[y_n]_q$ of the regular continued fraction $y_n = [n, n, n, \dots]$ is characterized by the functional equation

$$ [y_n]_q = [n]_q + \frac{q^n}{[n]_{q^{-1}} + \frac{q^{-n}}{[y_n]_q}}, $$

and therefore

$$ [y_n]_q = \frac{[n]_q[y_n]_q[n]_{q^{-1}} + q^{-n}[n]_q + q^n[y_n]_q}{[y_n]_q[n]_{q^{-1}} + q^{-n}}. $$

Since $[n]_{q^{-1}} = q^{1-n}[n]_q$, after some simplification we obtain (2.10). $\square$

**Corollary 2.6.** The $n$-th $q$-metallic number has the explicit expression

$$ (2.11) \qquad [y_n]_q = \frac{1}{2q} \left( q[n]_q + (q^n+1)(q-1) + \sqrt{(q[n]_q + (q^n+1)(q-1))^2 + 4q} \right) $$

and its power series expansion around $q=0$ is of the form

$$ (2.12) \qquad [y_n]_q = 1 + q + \cdots + q^{n-1} + q^{2n} + \sum_{i=2n+1}^{\infty} \kappa_i q^i $$

with coefficients $\kappa_i \in \mathbb{Z}_{\ge 0}$ (notice the gap of length $n$ in the powers of $q$).

*Proof.* The formula for $[y_n]_q$ (appearing first in [24]) is an immediate consequence of (2.10), while the series expansion follows from the gap theorem (Theorem 2.4) since one has $n \le y_n < n + \frac{1}{n}$ for all $n$. $\square$

**Example 2.7.** (a) The first metallic number is the golden ratio $\phi = y_1$, already discussed in the introduction. The generating function $G(q) = [y_1]_q$ of the $q$-deformed golden ratio is given by (1.5) and expands as the power series (1.4). It satisfies (and is characterized by) the functional equation

$$ (2.13) \qquad qG(q)^2 + (1 - q - q^2)G(q) = 1, $$
(see also [30]). Recalling that $G^{(1)}(q)$, $G^{(2)}(q)$, and $G^{(3)}(q)$ denote the generating functions of the shifted series (1.7), we also have

$$ (2.14) \qquad \begin{aligned} q^2 G^{(1)}(q)^2 + (1+q-q^2) G^{(1)}(q) &= q, \\ q^3 G^{(2)}(q)^2 + (1+q-q^2) G^{(2)}(q) &= 1, \\ q^4 G^{(3)}(q)^2 + (1+q-q^2+2q^3) G^{(3)}(q) &= -1+q-q^2. \end{aligned} $$

(b) The second example is the silver ratio $y_2$. The generating function $S(q) = [y_2]_q$ of its $q$-deformation is as in (1.13), it expands into the power series (1.12) and it satisfies the following functional equation

$$ (2.15) \qquad q S(q)^2 + (1-2q-q^3) S(q) = 1. $$

Let $S^{(1)}(q)$, $S^{(2)}(q)$, $S^{(3)}(q)$, and $S^{(4)}(q)$ be the generating functions of the shifted series (1.14). It easily follows from (2.15) that these functions satisfy

$$ (2.16) \qquad \begin{aligned} q^2 S^{(1)}(q)^2 + (1-q^3) S^{(1)}(q) &= 1+q^2, \\ q^3 S^{(2)}(q)^2 + (1+2q^2-q^3) S^{(2)}(q) &= q^2, \\ q^4 S^{(3)}(q)^2 + (1+2q^2-q^3) S^{(3)}(q) &= q, \\ q^5 S^{(4)}(q)^2 + (1+2q^2-q^3) S^{(4)}(q) &= 1. \end{aligned} $$

(c) The third example $y_3 = \frac{3+\sqrt{13}}{2}$ is sometimes called the “bronze ratio”. The generating function $B(q)$ of $[y_3]_q$ is given by

$$ (2.17) \qquad B(q) = \frac{q^4 + q^2 + 2q - 1 + \sqrt{(1-q+q^2)(1+q+2q^2+5q^3+2q^4+q^5+q^6)}}{2q} $$

and the series starts as follows

$$ B(q) = 1 + q + q^2 + q^6 - q^8 - 2q^9 + 2q^{10} + 4q^{11} + q^{12} - 11q^{13} - 7q^{14} + 15q^{15} + 34q^{16} - 17q^{17} - 83q^{18} - 38q^{19} + 189q^{20} + 215q^{21} - 260q^{22} + \dots $$

(This sequence is not in the OEIS.) Moreover, $B(q)$ is characterized by the functional equation

$$ q B(q)^2 + (1 - 2q - q^2 - q^4) B(q) = 1. $$

As concerns the shifted series $[y_3 - 1]_q = [\frac{1+\sqrt{13}}{2}]_q$, its generating function $B^{(1)}(q) := \frac{B(q)-1}{q}$ is such that

$$ (2.18) \qquad q^2 B^{(1)}(q)^2 + (1 - q^2 - q^4) B^{(1)}(q) = 1 + q + q^3. $$

(d) The next example is $y_4 = \sqrt{5} + 2$, sometimes called “platinum ratio”. The generating function of $[y_4]_q = [\sqrt{5} + 2]_q = q^2 [\sqrt{5}]_q + q + 1$ is

$$ P(q) = \frac{q^5 + q^3 + q^2 + 2q - 1 + \sqrt{(1-q+q^2)(1+q+2q^2+3q^3+6q^4+3q^5+2q^6+q^7+q^8)}}{2q}. $$

Further examples can be found in [24]; see Example 4.5.
### 3. q-IRRATIONALS AND SUPER $\delta$-FRACTIONS

This section contains the material that will be necessary for the proof of our main results. Namely, we produce various super $\delta$-fraction expansions, in the sense of [17], for the $q$-deformation of the metallic numbers. Some of them will be used in Section 4 to compute Hankel determinants of the golden and silver ratios.

**3.1. Super $\delta$-fractions and H-fractions.** A special class of generalized Jacobi fractions was introduced and studied by G.-N. Han in [17]. For every positive integer $\delta$, consider the expressions

$$ (3.1) \qquad H(q) = \frac{v_0 q^{k_0}}{1 + q U_1(q) - \frac{v_1 q^{k_0 + k_1 + \delta}}{1 + q U_2(q) - \frac{v_2 q^{k_1 + k_2 + \delta}}{1 + q U_3(q) - \frac{v_3 q^{k_2 + k_3 + \delta}}{\ddots}}} $$

where $v_i \neq 0$ are constants, $k_i \in \mathbb{Z}_{\ge 0}$, and $U_i(q)$ are polynomials such that $\deg(U_i) \le k_{i-1} + \delta - 2$. These continued fractions were called in [17] “super $\delta$-fractions”. They include the regular C-fractions (for $\delta = 1$ and $k_i \equiv 0$) and the J-fractions (for $\delta = 2$ and $k_i \equiv 0$). One of the main results of [17] is that for every $\delta \ge 1$ any power series can be expanded as a unique super $\delta$-fraction.

In the special case where $\delta = 2$, the continued fractions (3.1) were called *H-fractions* and applied to computation of Hankel determinants. In particular, Theorem 2.1 of [17] states the following. Introduce the notation

$$ (3.2) \qquad s_n := \sum_{i=0}^{n-1} k_i + n, \qquad \varepsilon_n := \sum_{i=0}^{n-1} \frac{k_i (k_i + 1)}{2}, \qquad \text{for } n \ge 1. $$

Then

$$ (3.3) \qquad \left\{ \begin{array}{l} \Delta_{s_n}(H(q)) = (-1)^{\varepsilon_n} v_0^{s_n} v_1^{s_n-s_1} v_2^{s_n-s_2} \cdots v_{n-1}^{s_n-s_{n-1}}, \\ \Delta_m(H(q)) = 0 \quad \text{if } m \notin \{s_n, n \ge 1\}. \end{array} \right. $$

This theorem is a powerful tool that we will use systematically. Note that [17] also contains an efficient algorithm for producing H-fractions for power series with generating functions satisfying quadratic functional equations. This algorithm can be applied to our examples, but, for the golden and silver $q$-numbers we give direct simple proofs. We also refer to [18] for a long history of this statement that was independently proved in different forms and with different generality by several authors; see, e.g. [9].

The proof of (3.3) is based on the following beautiful lemma that we will often use directly.

**Lemma 3.1** (Lemma 2.2 of [17]). Let $k$ be a nonnegative integer and let $F(q), G(q)$ be two power series such that

$$ F(q) = \frac{q^k}{1 + q U(q) - q^{k+2} G(q)} $$

where $U(q)$ is a polynomial of $\deg(U) \le k$. Then, $\Delta_n(F) = (-1)^{\frac{k(k+1)}{2}} \Delta_{n-k-1}(G)$.
**3.2. Super $\delta$-fractions of metallic $q$-numbers.** For convenience, we will use the following notation:

$$ (3.4) \qquad \begin{aligned} \langle n \rangle_q &:= q[n]_q + (1+q^n)(1-q) \\ &= \begin{cases} 1+q^2+q^3+\cdots+q^{n-1}+2q^n-q^{n+1} & \text{if } n \ge 3, \\ 1+2q^2-q^3 & \text{if } n=2, \\ 1+q-q^2 & \text{if } n=1. \end{cases} \end{aligned} $$

The following statement is our most general result.

**Theorem 3.2.** (i) If $y_n$ is a metallic number, i.e. $y_n = \frac{n+\sqrt{n^2+4}}{2} = [n, n, n, \dots]$ for some integer $n$, then we have the following 1-periodic expansions:

$$ (3.5) \qquad [y_n]_q = [n]_q + \frac{q^{2n}}{\langle n \rangle_q + \frac{q^{2n+1}}{\langle n \rangle_q + \frac{q^{2n+1}}{\ddots}}} $$

and

$$ (3.6) \qquad \sigma_q(y_n) = \frac{q^{n-1}}{\langle n \rangle_q + \frac{q^{2n+1}}{\langle n \rangle_q + \frac{q^{2n+1}}{\ddots}}} $$

where $\sigma_q(y_n)$ is defined by (2.9).

(ii) The continued fraction (3.6) is a super $\delta$-fraction with $\delta = 3$.

*Proof.* Part (i). We transform (2.10) into a quadratic equation for $\sigma_q(y_n)$. Indeed, (2.9) reads $[y_n]_q = [n]_q + q^{n+1}\sigma_q(y_n)$, and inserting this equality in (2.10) leads after some calculation to

$$ q^{n+2}\sigma_q(y_n)^2 + \langle n \rangle_q \sigma_q(y_n) - q^{n-1} = 0 $$

so that

$$ (3.7) \qquad \sigma_q(y_n) = \frac{q^{n-1}}{\langle n \rangle_q + q^{n+2}\sigma_q(y_n)} $$

which is clearly equivalent to (3.6) and thus to (3.5).

Part (ii). The continued fraction (3.6) fits into the general formula (3.1) with $\delta = 3$, taking $v_0 = 1$ and all other coefficients $v_i = -1$, and $k_i = n-1$ for all $i$. $\square$

**Example 3.3.** For $n = 1$ formula (3.6) coincides with (1.10), for $n = 2$ this is (1.15).

**Remark 3.4.** The continued fractions (3.6) are very simple and 1-periodic. They are of type (3.1), but unfortunately they are not H-fractions, since $\delta = 3$. Therefore, the methods of [17] to calculate the Hankel determinants cannot be applied to them. Our next goal is to rewrite these super $\delta$-fractions as H-fractions, we succeeded to do this in several cases.
3.3. **H-fractions for the golden ratio.** Let us now rewrite the continued fraction expansions for the series $G(q)$ (see (1.4)) and its shifts, in such a way that they become H-fractions, i.e. super $\delta$-fractions with $\delta = 2$. This will be useful for the proof of Theorem 1.6.

**Lemma 3.5.** The function $G^{(2)}(q)$ has the following 3-periodic H-fraction expansion:

$$ (3.8) \qquad G^{(2)}(q) = \frac{1}{1+q-\frac{q^2}{1+q+\frac{q^3}{1+q-q^2+\frac{q^3}{1+q-\frac{q^2}{\ddots}}}}} $$

*Proof.* On the one hand, expression (3.8) directly follows from (2.14). On the other hand, in formula (3.1) with $\delta = 2$, take the following 3-periodic sequences of coefficients $k_i, v_i$ and polynomials $U_i$

$$ (3.9) \qquad \begin{aligned} k_i &= 0, 0, 1, \quad 0, 0, 1, \quad 0, \dots \\ v_i &= 1, 1, -1, \quad -1, 1, -1, \quad -1, \dots \\ U_i &= 1, \quad 1, 1-q, \quad 1, \quad 1, 1-q, \quad \dots \end{aligned} $$

where $i = 0, 1, 2, 3, \dots$. With this choice, the H-fraction (3.1) is precisely the continued fraction (3.8). $\square$

The proofs of the two following statements are similar to that of Lemma 3.5.

**Lemma 3.6.** One has the following continued fraction expansion

$$ (3.10) \qquad G(q) = \frac{1}{1 - \frac{q^2}{1 + q + \frac{q^3}{1 + q - q^2 + \frac{q^3}{1 + q - \frac{q^2}{1 + q + \frac{q^3}{1 + q - q^2 + \frac{q^3}{1 + q - \frac{q^2}{\ddots}}}}}}} $$

which is an H-fraction, 3-periodic starting from the third numerator.
**Lemma 3.7.** One has the following 2-periodic continued fraction expansion

$$ (3.11) \qquad G^{(3)}(q) = \frac{1}{1 + 2q - \frac{q^4}{1 + q - q^2 + 2q^3 - \frac{q^4}{1 + 2q - \frac{q^4}{1 + q - q^2 + 2q^3 - \frac{q^4}{\ddots}}}}} $$

which is also an H-fraction.

**3.4. H-fractions for the silver ratio.** Let us do the similar work in the case of our second main example, the silver ratio $y_2$. We present H-fractions for the series $S(q)$, $S^{(1)}(q)$ and $S^{(3)}(q)$ given by (1.14). They will be used to prove Theorem 1.8.

**Lemma 3.8.** One has the following 8-periodic H-fraction presentation

$$ (3.12) \qquad S^{(1)}(q) = \frac{1}{1 - \frac{q^3}{1 + 2q^2 + \frac{q^5}{1 + 2q^2 - q^3 + \frac{q^5}{1 + 2q^2 - \frac{q^3}{1 + \frac{q^2}{1 + \frac{q^2}{1 + q + \frac{q^2}{1 + q^2 S^{(1)}(q)}}}}}}} $$

*Proof.* The series $S^{(1)}(q)$ and $S^{(3)}(q)$ are related via the continued fractions

$$ (3.13) \qquad S^{(1)}(q) = \frac{1}{1 - \frac{q^3}{1 + 2q^2 + \frac{q^5}{1 + 2q^2 - q^3 + q^4 S^{(3)}(q)}}} $$

and

$$ (3.14) \qquad S^{(3)}(q) = \frac{q}{1 + 2q^2 - \frac{q^3}{1 + \frac{q^2}{1 + \frac{q^2}{1 + q + \frac{q^2}{1 + q^2 S^{(1)}(q)}}}}} $$
Indeed, using $S^{(1)}(q) = q^2 S^{(3)}(q) + 1$, formula (3.13) is equivalent to

$$S^{(1)} = \frac{1}{1 - \frac{q^3}{1 + 2q^2 + \frac{q^5}{1 + q^2 - q^3 + q^2 S^{(1)}}}}$$

which follows from the first equation in (2.16); similarly for (3.14). Gluing (3.13) and (3.14), we obtain (3.12).

It remains only to check that it has the type (3.1) of an H-fraction. This is easily done, by using the following 8-periodic sequences of coefficients $k_i, v_i$ and polynomials $U_i$

$$ (3.15) \qquad \begin{aligned} k_i &= 0, 1, 2, \qquad 1, 0, 0, 0, 0, \dots \\ v_i &= 1, 1, -1, \qquad -1, 1, -1, -1, -1, \dots \\ U_i &= 0, 2q, 2q - q^2, \qquad 2q, 0, 0, 1, q, \dots \end{aligned} $$

where $i = 0, 1, 2, 3, \dots$

□

**Lemma 3.9.** One has the following relation between the generating function $S(q)$ and its first shift

$$ (3.16) \qquad S(q) = \frac{1}{1 - q + \frac{q^2}{1 + q + \frac{q^2}{1 + q^2 S^{(1)}(q)}}} $$

Note that the concatenation of (3.16) and (3.12) gives an H-fraction for the $q$-deformation $S(q)$ of the silver ratio $y_2$.

*Proof.* This follows from (2.15) combined with $S(q) = q S^{(1)}(q) + 1$. □

### 4. HANKEL DETERMINANTS OF q-METALLIC NUMBERS

In this section, we prove Theorems 1.6, 1.7 and 1.8. We then consider more examples of the series $[y_n]_q$, and observe experimentally that several first sequences of their Hankel determinants consist of $-1, 0$, and $1$ only. Moreover, the number of $\{-1, 0, 1\}$-Hankel sequences increases, as $n$ grows.

The most fascinating property of these $\{-1, 0, 1\}$-Hankel sequences is that they satisfy Somos or Gale-Robinson recurrences. This property is easily proved for the gold and silver ratio and remains conjectural for other metallic numbers.

**4.1. Shifted Hankel determinants.** We first establish a general formula concerning Hankel determinants of metallic numbers.

**Proposition 4.1.** Let $y_k = [k, k, k, \dots]$ be a metallic number. We have the following relation between the shifted Hankel determinants:

$$ \Delta_n^{(k)}([y_k]_q) = (-1)^{n+\frac{(k+1)(k-2)}{2}} \Delta_{n-k-1}^{(k+1)}([y_k]_q). $$
*Proof.* Let $x_k = y_k - k$ and $\sigma_q(y_k) = \frac{[x_k]_q}{q}$ as in (2.9). By definition, the power series $[x_k]_q$ and $\sigma_q(y_k)$ satisfy the relations

$$[y_k]_q = [k]_q + q^k [x_k] = [k]_q + q^{k+1} \sigma_q(y_k)$$

hence $\Delta_n^{(k)}([y_k]_q) = \Delta_n([x_k]_q)$ and $\Delta_n^{(k+1)}([y_k]_q) = \Delta_n(\sigma_q(y_k))$. On the other hand, from (3.7) we have

$$[x_k]_q = \frac{q^k}{\langle k \rangle_q + q^{k+2} \sigma_q(y_k)}.$$

where, according to (3.4), $\langle k \rangle_q$ is of the form $1 + u(q)q$ with $u(q)$ a polynomial of degree $k$. Thus we can apply Lemma 3.1 and get that

$$\Delta_n([x_k]_q) = (-1)^{k(k+1)/2} \Delta_{n-k-1}(-\sigma_q(y_k)) = (-1)^{k(k+1)/2} (-1)^{n-k-1} \Delta_{n-k-1}(\sigma_q(y_k)),$$

hence the result.

□

**4.2. The case of golden ratio.** *Proof of Theorems 1.6 and 1.7.* We are ready to prove that the first Hankel determinants of the $q$-deformed golden ratio are indeed given by (1.17) and that they characterize the series (1.4).

*Proof of Theorem 1.6.* Until the end of the proof the Hankel determinants $\Delta_n^{(\ell)}(G)$ will be simply denoted by $\Delta_n^{(\ell)}$ when there is no ambiguity.

It is clear that it suffices to prove Part (1) of the theorem, and here is our strategy:

(a) first, we shall prove that the knowledge of any of the first three sequences of determinants $\Delta = \Delta^{(0)}, \Delta^{(1)}, \Delta^{(2)}$ entails the knowledge of the two others, because there are very simple relations between them.

Then it will be sufficient:

(b) to calculate $\Delta^{(2)}$, and

(c) to calculate $\Delta^{(3)}$.

Before we do so, a first obvious but crucial observation is that the three shifted determinants $\Delta_n^{(\ell)}$, where $\ell = 1, 2, 3$, correspond to the non-shifted Hankel determinant $\Delta_n$ of a shifted variant of $G(q)$ or, equivalently, of a power series represented by one of the generating functions $G^{(\ell)}$, $\ell = 1, 2, 3$ introduced in (1.7). To make it clear:

$$\Delta_n^{(\ell)} = \Delta_n(G^{(\ell)}), \quad \ell = 0, 1, 2, 3.$$

Now we start our proof.

(a) Applying Proposition 4.1 to the case of the golden ratio $\varphi = y_1$, one obtains the relation

$$\Delta_n(G^{(1)}) = (-1)^{n-1} \Delta_{n-2}(G^{(2)})$$

or equivalently

$$\Delta_n^{(1)} = (-1)^{n-1} \Delta_{n-2}^{(2)}.$$

Thus the second and third sequences in (1.17) can be deduced the one from the other. Similarly, because of (1.6) and (1.7) we have

$$G(q) = \frac{1}{1 - q^2 F_1(q)}, \quad \text{with} \quad F_1(q) = \frac{1}{1 + qG(q)} = \frac{1}{1 + q + q^2 G^{(1)}(q)}.$$
Applying Han's Lemma 3.1 we thus obtain the relation

$$ \Delta_n = \Delta_n(G) = (-1)^n \Delta_n(G^{(1)}) = (-1)^n \Delta_{n-2}^{(1)} $$

which connects the second sequence in (1.17) with the first one.

(b) Now we determine explicitly the shifted Hankel determinants $\Delta_n^{(2)}$. Since the continued fraction (3.8) is an H-fraction by Lemma 3.5, we can calculate the Hankel determinants $\Delta_n^{(2)}$ via formula (3.3). The parameters $v_i, s_i, \varepsilon_i$ contributing in this formula can be easily deduced from (3.9) and (3.2):

$$ \begin{aligned} v_i &= 1, 1, -1, -1, 1, -1, -1, -1, -1, \dots \\ s_i &= 1, 2, 4, 5, 6, 8, 9, 10, 12, \dots \\ \varepsilon_i &= 0, 0, 1, 1, 1, 2, 2, 2, 3, \dots \end{aligned} $$

where $i = 0, 1, 2, 3, \dots$. The sequence $(s_i)$ misses the values $3+4i = 3, 7, 11, \dots$ which means that the Hankel determinants $\Delta_{3+4i}^{(2)}$ vanish. On the other hand, the non-zero values of the Hankel determinants of the sequence $\sigma_q(\varphi)$ are as follows:

$$ \Delta_0^{(2)} = 1, \quad \Delta_1^{(2)} = 1, \quad \Delta_2^{(2)} = 1, \quad \Delta_4^{(2)} = -1, \quad \Delta_5^{(2)} = -1, \quad \Delta_6^{(2)} = -1, \quad \Delta_8^{(2)} = 1, \dots $$

In other words we have proved that the sequence $\Delta^{(2)}$ is the one given in the third row of (1.17). Because of (a) this proves also that $\Delta$ and $\Delta^{(1)}$ are as in (1.17).

(c) The remaining case of $\Delta^{(3)} = \Delta(G^{(3)})$ in (1.17) is treated by applying formula (3.3) to the H-fraction (3.11). The parameters of this H-fraction are $k_{2m} = 0, k_{2m+1} = 2$ for all $m \ge 0$, and thus

$$ s_i = 1, 4, 5, 8, 9, 12, 13, \dots, \quad i = 1, 2, 3, \dots $$

are the indices of non-zero determinants. We obtain this way the fourth row in (1.17).

Theorem 1.6 is proved.

**Remark 4.2.** An alternative proof of (b) above would be the following. According to (3.8), one can write

$$ G^{(2)}(q) = \frac{1}{1 + q - q^2 F_1(q)}, \quad F_1(q) = \frac{1}{1 + q + q^2 F_2(q)}, \quad F_2(q) = \frac{q}{1 + q - q^2 + q^3 G^{(2)}(q)}. $$

Applying Han's Lemma 3.1 we thus obtain the relations

$$ \Delta_n(G^{(2)}) = \Delta_{n-1}(F_1), \quad \Delta_n(F_1) = (-1)^{n-1} \Delta_{n-1}(F_2), \quad \Delta_n(F_2) = (-1)^{n-1} \Delta_{n-2}(G^{(2)}) $$

which imply the 4-antiperiodicity: $\Delta_n^{(2)} = -\Delta_{n-4}^{(2)}$. Thus it suffices to calculate the first four determinants $\Delta_n^{(2)}$ with $n = 0, 1, 2, 3$ to get the complete sequence.

Similarly, using (3.11) we easily prove the 4-antiperiodicity of the $\Delta^{(3)}$ sequence and this gives another proof of (c).

Finally, let us mention that, instead of proving the validity of our formula (1.17) for the sequence of shifted determinants $\Delta^{(2)}$ as we did in (b), we could have looked instead at the sequence of non-shifted determinants $\Delta$, since (a) above shows that they are equivalent. The proof is quite the same and consists in applying formula (3.3) to the H-fraction (3.10).
*Proof of Theorem 1.7.* Let us now prove that the series $G(q)$ is characterized by the Hankel determinants (1.17). We proceed by induction: assume that the first $k$ coefficients, $G_0, G_1, \dots, G_{k-1}$ of the series

$$G(q) = \sum_{i=0}^{\infty} G_i q^i$$

(see (1.4)) are determined by (1.17). We need to prove that $G_k$ is also determined by these determinants.

Among the Hankel determinants (1.17), consider those with $G_k$ in the lower right entry:

$$(4.1) \qquad \Delta_n^{(\ell)}(G) = \begin{vmatrix} \Delta_{n-1}^{(\ell)} & \vdots & \\ \dots & G_k \end{vmatrix},$$

where $\ell = 0, 1, 2, 3$ and $\ell + 2n - 2 = k$ (see (1.16)). For every $G_k$ there are exactly two such Hankel determinants: if $k$ is even, these are $\Delta_{\frac{k}{2}+1}^{(\ell)}$ and $\Delta_{\frac{k}{2}}^{(\ell)}$; if $k$ is odd, these are $\Delta_{\frac{k+1}{2}}^{(\ell)}$ and $\Delta_{\frac{k-1}{2}}^{(\ell)}$.

It is easy to see that, according to Theorem 1.6 (see (1.17)), at least one of the determinants $\Delta_{n-1}^{(\ell)}$ in (4.1) is different from 0. Indeed, for every $k$, either $\Delta_{\frac{k}{2}+1}^{(\ell)} \neq 0$, or $\Delta_{\frac{k}{2}}^{(\ell)} \neq 0$, and either $\Delta_{\frac{k+1}{2}}^{(\ell)} \neq 0$, or $\Delta_{\frac{k-1}{2}}^{(\ell)} \neq 0$. Since the row and the column containing $G_k$ in (4.1) consist of coefficients $G_i$ with $i < k$, which are known by induction hypothesis, we conclude that the value of (4.1) determines $G_k$, provided $\Delta_{n-1}^{(\ell)}$ is different from 0.

Theorem 1.7 is proved.

4.3. **The case of silver ratio.** *Proof of Theorem 1.8.* For short, we will use the notation $\Delta_n^{(\ell)}$ instead of $\Delta_n^{(\ell)}(S)$ until the end of the proof, so that

$$\Delta_n^{(\ell)} = \Delta_n(S^{(\ell)}), \quad \ell = 0, 1, 2, 3, 4,$$

with $S^{(\ell)}$ defined in (1.14). Let us prove Part (1) of the theorem, which immediately implies Part (2).

(a) Consider first the shifted series $S^{(1)}(q)$. Applying (3.3) to the continued fraction of Lemma 3.8, we obtain the second formula in (1.19). Indeed, the parameters $v_i, s_i, \epsilon_i$ contributing in this formula can be easily deduced from (3.15) and (3.2):

$$\begin{align*} v_i &= 1, 1, -1, -1, 1, -1, -1, -1, -1, \dots \\ s_i &= 1, 3, 6, 8, 9, 10, 11, 12, \dots \\ \epsilon_i &= 0, 1, 4, 5, 5, 5, 5, 5, \dots \end{align*}$$

where $i = 0, 1, 2, 3, \dots$. The Hankel sequence $\Delta_n^{(1)}$ is then given by (3.3).

(b) Now, Lemma 3.9 allows us to calculate the Hankel determinants $\Delta_n$. Indeed, using auxiliary functions $F_1(q)$ and $F_2(q)$, formula (3.16) reads

$$S(q) = \frac{1}{1 - q + q^2 F_1(q)}, \qquad F_1(q) = \frac{1}{1 + q + q^2 F_2(q)}, \qquad F_2(q) = \frac{1}{1 + q^2 S^{(1)}(q)}.$$

Applying then Han's Lemma 3.1, we have

$$\Delta_n = (-1)^{n-1} \Delta_{n-1}(F_1), \qquad \Delta_n(F_1) = (-1)^{n-1} \Delta_{n-1}(F_2), \qquad \Delta_n(F_2) = (-1)^{n-1} \Delta_{n-1}^{(1)}.$$
Hence, we conclude $\Delta_n = (-1)^n \Delta_{n-3}^{(1)}$, in accordance with (1.19).

(c) Applying (3.13), we are able to calculate the determinants $\Delta_n^{(3)}$. Once again, using auxillary functions $F_1(q)$ and $F_2(q)$, formula (3.13) then gives

$$S^{(1)}(q) = \frac{1}{1 - q^2 F_1(q)}, \quad F_1(q) = \frac{q}{1 + 2q^2 + q^3 F_2(q)}, \quad F_2(q) = \frac{q^2}{1 + 2q^2 - q^3 + q^4 S^{(3)}(q)}$$

From Han's Lemma, we have

$$\Delta_n^{(1)} = \Delta_n(F_1), \quad \Delta_n(F_1) = (-1)^{n-1} \Delta_{n-2}(F_2), \quad \Delta_n(F_2) = (-1)^n \Delta_{n-3}^{(3)},$$

and therefore $\Delta_n^{(1)} = -\Delta_{n-6}^{(3)}$ confirming the fourth row of (1.19).

(d) Finally, we apply Proposition 4.1 to deduce the row $\Delta_n^{(2)}$ in (1.19) from $\Delta_n^{(3)}$:

$$\Delta_n^{(2)} = (-1)^n \Delta_{n-3}^{(3)}.$$

Theorem 1.8 is proved.

**Remark 4.3.** As for Theorem 1.6, let us mention that there are alternative proofs of Theorem 1.8. For instance, 3.13 and 3.14 connect the determinants $\Delta_n^{(3)}$ with $\Delta_n^{(1)}$. Indeed, using the same method as in (b) and (c), we have $\Delta_n^{(3)} = -\Delta_{n-6}^{(1)}$. Combining this with the conclusion (c), one proves the 12-periodicity of the Hankel sequence $\Delta_n^{(3)}$, and thus of $\Delta_n, \Delta_n^{(1)}$, and $\Delta_n^{(2)}$. Then to prove Theorem 1.8 it suffices to calculate the first 11 values of (one of) the sequences.

**4.4. The case of $y_3$ and $y_4$: more rows of $-1, 0, 1$.** Consider the next example (after $\delta$) of metallic number $y_3 = \frac{3+\sqrt{13}}{2}$. Computer assisted proofs, in particular, application of Algorithms of [17], show that the phenomena already observed for $\varphi$ and $\delta$ become even more amazing: the number of Hankel sequences consisting of $-1, 0, 1$ increases.

**Experimental Fact 4.4.** The first five sequences of Hankel determinants $\Delta_n^{(\ell)}$ associated with the series $\left[ \frac{3+\sqrt{13}}{2} \right]_q$ generated by the function (2.17), consist of $-1, 0$ and $1$ only. These sequences are 24-antiperiodic

$$\Delta_{n+24}^{(\ell)} = -\Delta_n^{(\ell)}, \quad \ell = 0, 1, 2, 3, 4,$$

with the following (anti)periods

$$\Delta_n = 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 0, 0, 1, 0, 0, 0, 1, 0, 0, -1, -1, 0, 1, 1, \dots$$

$$\Delta_n^{(1)} = 1, 1, -1, 0, 1, -1, 0, 0, -1, 0, 0, 0, -1, 0, 0, -1, 1, 0, -1, 1, 1, -1, 0, 1, \dots$$

$$\Delta_n^{(2)} = 1, 1, 0, 0, -1, 0, 0, 0, -1, 0, 0, 1, 1, 0, -1, -1, 1, 1, 0, -1, -1, 1, 1, 0, \dots$$

$$\Delta_n^{(3)} = 1, 0, 0, 0, 1, 0, 0, 1, -1, 0, 1, -1, -1, 1, 0, -1, 1, 1, -1, 0, 1, -1, 0, 0, \dots$$

$$\Delta_n^{(4)} = 1, 0, 0, -1, -1, 0, 1, 1, -1, -1, 0, 1, 1, -1, -1, 0, 1, 1, 0, 0, -1, 0, 0, 0, \dots$$

Note that the algorithms of [17] provide a “computer assisted proof” of the above statement.

**Remark 4.5.** The above sequences $\Delta_n^{(0)}, \dots, \Delta_n^{(4)}$ have multiple symmetries. In particular, they satisfy

$$(4.3) \qquad \Delta_n = (-1)^{n-1} \Delta_{n-4}^{(1)} = -\Delta_{n-8}^{(2)} = (-1)^n \Delta_{n-12}^{(3)} = \Delta_{n-16}^{(4)}.$$
Some of the above relations are easy to prove. For instance, the last equality in (4.3) is a corollary of Proposition 4.1, while the second equality follows from the following.

**Lemma 4.6.** One has

$$B^{(1)}(q) = \frac{1}{1 - q + \frac{q^2}{1 + q + \frac{q^3}{1 + q^2 B^{(1)}(q)}}} = \frac{1}{1 - q + \frac{q^2}{1 + q + \frac{q^3}{1 + q + q^3 B^{(2)}(q)}}}.$$

*Proof.* This readily follows from (2.18). □

Using Lemma 3.1 we get the following.

**Corollary 4.7.** The second and the third rows are related via $\Delta_n^{(1)} = (-1)^n \Delta_{n-4}^{(2)}$.

The other two relations in (4.3) require more sophisticated computations, and we do not elaborate the details here.

The next Hankel sequences have entries different from $-1, 0, 1$, but certain symmetry persists. For example we have a sequence which is again 24-antiperiodic with the following (anti)period

$$\Delta_n^{(5)} = 1, 0, -1, 2, 1, -1, 1, 0, -1, 0, 0, -1, 0, 1, -1, 1, 2, -1, 0, 1, 0, 0, 0, 0, \dots$$

Let us end this section with the case of $\sqrt{5} + 2 = y_4$.

**Experimental Fact 4.8.** The first six sequences of Hankel determinants of $[\sqrt{5} + 2]_q$ consist of $-1, 0, 1$ only, and they are 40-periodic. The sequences start like this

$$\begin{align*}
\Delta_n &= 1, \ 1, \ 0, \ 0, \ 1, \ 1, \ -1, \ 0, \ 1, \ 0, \ -1, \ -1, \ 1, \ \dots \\
\Delta_n^{(1)} &= 1, \ 1, \ 0, \ -1, \ 0, \ 1, \ -1, \ -1, \ 0, \ 0, \ -1, \ -1, \ 0, \ \dots \\
\Delta_n^{(2)} &= 1, \ 1, \ -1, \ 0, \ 0, \ 1, \ -1, \ 0, \ 0, \ 0, \ -1, \ 0, \ 0, \ \dots \\
\Delta_n^{(3)} &= 1, \ 1, \ 0, \ 0, \ 0, \ 1, \ 0, \ 0, \ 0, \ 0, \ -1, \ 0, \ 0, \ \dots \\
\Delta_n^{(4)} &= 1, \ 0, \ 0, \ 0, \ 0, \ 1, \ 0, \ 0, \ 0, \ 1, \ -1, \ 0, \ 0, \ \dots \\
\Delta_n^{(5)} &= 1, \ 0, \ 0, \ 0, \ 1, \ 1, \ 0, \ 0, \ 1, \ 1, \ -1, \ 0, \ 1, \ \dots
\end{align*}
(4.4)$$

The following relations hold between the rows:

$$\Delta_n^{(\ell)} = (-1)^{n-1} \Delta_{n-5}^{(\ell+1)}$$

for $\ell = 0, 1, 2, 3, 4$.

The algorithms of [17] also provide “computer assisted proof” of this statement.

**4.5. The Somos-4, Somos-6 and Gale-Robinson recurrences.** (a) Consider first the case of the golden ratio. We already know the first rows of Hankel determinants of $G(q)$ (see Theorem 1.6), and it is an easy task to check that the first three rows $\Delta_n(G)$, $\Delta_n^{(1)}(G)$, and $\Delta_n^{(2)}(G)$, satisfy the Somos-4 recurrence (1.20).

It is interesting to notice that in every 8-periodic row satisfying this recurrence the 4 first (“initial”) values determine the 4 remaining. For instance, in the first row

$$\Delta_n(G) = 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, \dots$$
where $n = 0, 1, 2, \dots$ the values $1, 1, 1, 0$ determine the rest. Indeed, although the recurrence equation $\Delta_7\Delta_3 = \Delta_6\Delta_4 - \Delta_5^2$ does not allow to recover $\Delta_7$, since $\Delta_3 = 0$, the next equation $\Delta_8\Delta_4 = \Delta_7\Delta_5 - \Delta_6^2$ determines $\Delta_7$, since $\Delta_8$ is known by periodicity.

(b) In the case of the Silver ratio, the first four rows satisfy the Somos-6 recurrence (1.21): similarly to the case of the golden ratio, this is an easy consequence of Theorem 1.8. Moreover, one can check that this Somos-6 recurrence, together with the 12-periodicity assumption, allows one to recover the full sequence of coefficients from the six first terms.

Note also that the quadratic functional equations (2.16) fit into the class of sequences satisfying Eq. (4.22) of [21], so that this observation can be understood as a part of Theorem 5.5 of this reference.

(c) The five sequences of Hankel determinants (4.2) of the bronze number $y_3 = \frac{3+\sqrt{13}}{2}$ satisfy the Gale-Robinson recurrence

$$ \Delta_{n+8}\Delta_n = \Delta_{n+7}\Delta_{n+1} - \Delta_{n+4}^2, $$

in accordance with Conjecture 1.9.

(d) For the metallic number $y_4 = \sqrt{5} + 2$, the six sequences of Hankel determinants (4.4) satisfy the Gale-Robinson recurrence

$$ (4.5) \qquad \Delta_{n+10}\Delta_n = \Delta_{n+9}\Delta_{n+1} - \Delta_{n+5}^2. $$

As before, recurrence (4.5) allows to recover the Hankel sequences from the 10 initial values, provided we know that the sequences are 40-periodic.

## 5. MISCELLANEOUS EXAMPLES OF CONTINUED FRACTIONS FOR q-NUMBERS

In this section we give several examples of continued fractions for the series representing $q$-deformed rationals and $q$-deformed irrationals. Some of them are quite elegant and allow one to hope for a more general theory which is out of reach so far.

**5.1. Another J-fraction for the silver ratio.** Let us consider the series $1 - S^{(2)}(q)$ (see (1.14)) that has essentially the same sequence of coefficients than $S(q)$. It turns out that this series has a rather nice 2-periodic J-type continued fraction expansion.

**Proposition 5.1.** One has the following 2-periodic continued fraction

$$ 1 - S^{(2)}(q) = \frac{1}{1 + \frac{q^2}{1 + q^2 - \frac{q^3}{1 + \frac{q^2}{1 + q^2 - \frac{q^3}{\ddots}}}}} $$

*Proof.* This is an immediate corollary of (2.16). $\square$

**5.2. A Stieltjes type formula for $S^{(2)}(q)$.** We give here the result of a straightforward computation. The formula below is rather complicated and does not leave a hope for general results in this direction. For a symmetry reason, we multiply $S^{(2)}(q)$ by $q^3$.
**Example 5.4.** One has for instance

$$[3]_q = \frac{1}{1 - \frac{q}{1 + \frac{q^2}{1 + q}}}$$

$$[4]_q = \frac{1}{1 - \frac{q}{1 + \frac{q^3}{1 + \frac{q}{1 - \frac{q}{1+q}}}}}$$

$$[5]_q = \frac{1}{1 - \frac{q}{1 + \frac{q^4}{1 + \frac{q}{1 - \frac{q}{1 + \frac{q^2}{1 + \frac{q}{1+q}}}}}}}$$

and for the reciprocal numbers

$$\left[\frac{1}{3}\right]_q = \frac{q^2}{1 + \frac{q}{1 - \frac{q}{1+q}}}$$

$$\left[\frac{1}{4}\right]_q = \frac{q^3}{1 + \frac{q}{1 - \frac{q}{1 + \frac{q^2}{1 + \frac{q}{1+q}}}}}$$

$$\left[\frac{1}{5}\right]_q = \frac{q^4}{1 + \frac{q}{1 - \frac{q}{1 + \frac{q^3}{1 + \frac{q}{1 - \frac{q}{1 + \frac{q^2}{1 + \frac{q}{1+q}}}}}}}$$

**5.4. C-fractions for q-rationals.** The simplest examples for q-rationals are as follows.

$$\left[\frac{2}{5}\right]_q = \frac{q^2}{1 + \frac{2q^2}{1 + \frac{q}{1 + \frac{q}{2}}}}$$

$$\left[\frac{3}{5}\right]_q = \frac{q}{1 + \frac{q}{1 + \frac{q}{1 + \frac{q^2}{1+q^2}}}}}$$

Here we have used the expansions

$$\frac{2}{5} = [0, 2, 2],$$

$$\frac{3}{5} = [0, 1, 1, 2],$$

and applied definition (2.2).

**Acknowledgements.** We are grateful to Guoniu Han, Andrew Hone, Sophie Morier-Genoud, and Michael Somos for enlightening discussions. We are also happy to thank Sergei Tabachnikov, Aleksey Ustinov, and Alexander Veselov for helpful comments.

## REFERENCES

[1] M. Aigner, A course in enumeration, Graduate Texts in Mathematics, 238. Springer, Berlin, 2007. x+561 pp. 3

[2] M. Aigner, *Catalan-like numbers and determinants*, J. Combin. Theory Ser. A **87** (1999), 33–51. 2, 7

[3] M. Aigner, *Motzkin numbers*, European J. Combin. **19** (1998), 663–675. 7

[4] A. Bapat, L. Becker, A. Licata, *q-deformed rational numbers and the 2-Calabi-Yau category of type A₂*, Forum Math. Sigma **11** (2023), Paper No. e47, 41 pp. 11, 14

[5] P. Barry, *Generalized Catalan numbers, Hankel transforms and Somos-4 sequences*. J. Integer Seq. 13 (2010), no. 7, Article 10.7.2, 16 pp. 4, 5, 7, 8, 9

[6] P. Barry, *On a generalization of the Narayana triangle*, J. Integer Seq. **14** (2011), Article 11.4.5, 22 pp. 4, 6, 7
[7] P. Barry, *On the Hankel transform of C-fractions*, arXiv:1212.3490, 2, 8

[8] P. Barry, *On sequences with $\{-1, 0, 1\}$ Hankel transforms*, arXiv:1205.2565, 7

[9] V.I. Buslaev, *On Hankel determinants of functions given by their expansions in P-fractions*, Ukrainian Math. J. 62 (2010) 358-372. 2, 7, 17

[10] P. Flajolet, *Combinatorial aspects of continued fractions*, Discrete Math. 32 (1980) 125-161. 2, 3

[11] S. Fomin, A. Zelevinsky, *The Laurent phenomenon*, Adv. in Appl. Math. 28 (2002), 119-144. 10

[12] A.P. Fordy, A.N.W. Hone, *Discrete integrable systems and Poisson algebras from cluster maps*, Comm. Math. Phys. 325 (2014), 527-584. 9, 10

[13] X-K. Chang, X-B. Hu, *A conjecture based on Somos-4 sequence and its extension*, Linear Algebra Appl., 436 (2012), 4285-4295. 8, 9

[14] J. Cigler, *A special class of Hankel determinants*, arXiv:1302.4235, 2, 7

[15] D. Gale, *The strange and surprising saga of the Somos sequences*, Math. Intelligencer 13 (1991), 40-42. 9

[16] D. Gale, Tracking the automatic ant. And other mathematical explorations. A collection of Mathematical Entertainments columns from The Mathematical Intelligencer. Springer-Verlag, New York, 1998. 9, 10

[17] G-N. Han, *Hankel continued fraction and its applications*, Adv. Math. 303 (2016), 295-321. 2, 3, 6, 7, 10, 17, 18, 25, 26

[18] G-N. Han, *Hankel continued fractions and Hankel determinants of the Euler numbers*, Trans. Amer. Math. Soc. 373 (2020), 4255-4283. 3, 7, 17

[19] F. Hirzebruch, *Hilbert modular surfaces*, Enseign. Math. (2) 19 (1973), 183-281. 11

[20] A.N.W. Hone, *Elliptic curves and quadratic recurrence sequences*, Bull. London Math. Soc. 37 (2005), 161-171. 9

[21] A.N.W. Hone, *Continued fractions and Hankel determinants from hyperelliptic curves*, Comm. Pure Appl. Math. 74 (2021), 2310-2347. 8, 9, 10, 27

[22] C. Krattenthaler, *Advanced determinant calculus*, Sém. Lothar. Combin. B42q (1998), 67 pp. 2, 3, 7

[23] C. Krattenthaler, *Advanced determinant calculus: a complement*, Linear Algebra Appl. 411 (2005), 68-166. 2, 3, 7

[24] L. Leclere, S. Morier-Genoud, *q-deformations in the modular group and of the real quadratic irrational numbers*, Adv. Appl. Math. 130 (2021), Paper No. 102223, 28 pp. 4, 11, 12, 13, 14, 15, 16, 28

[25] L. Leclere, S. Morier-Genoud, V. Ovsienko, A. Veselov, *On radius of convergence of q-deformed real numbers*, Mosc. Math. J. 24 (2024), 1-19. 4, 11

[26] W. Leighton, W.T. Scott, *A general continued fraction expansion*, Bull. Amer. Math. Soc. 45 (1939), 596-605. 2

[27] T. McConville, B.E. Sagan, C. Smyth, *On a rank-unimodality conjecture of Morier-Genoud and Ovsienko*, Discrete Math. 344 (2021), no. 8, Paper No. 112483, 13 pp. 12

[28] S. Morier-Genoud, V. Ovsienko, *Farey boat: continued fractions and triangulations*, modular group and polygon dissections, Jahresber. Dtsch. Math.-Ver. 121, no. 2 (2019), 91-136. 11

[29] S. Morier-Genoud, V. Ovsienko, *q-deformed rationals and q-continued fractions*, Forum Math. Sigma 8 (2020), e13, 55 pp. 4, 10, 11, 12, 13

[30] S. Morier-Genoud, V. Ovsienko, *On q-deformed real numbers*, Exp. Math. 32 (2022), no. 2, 652-660. 2, 4, 6, 10, 11, 12, 13, 14, 16

[31] S. Morier-Genoud, V. Ovsienko, A. Veselov, *Burau representation of braid groups and q-rationals*, Int. Math. Res. Not. 2024 (2024), no. 10, 8618-8627. 11, 14

[32] E.K. Oguz, M. Ravichandran, *Rank polynomials of fence posets are unimodal*, Discrete Math. 346 (2023), no. 2, Paper No. 113218, 20 pp. 11, 12

[33] N. Ovenhouse, *q-rationals and finite Schubert varieties*, C. R. Math. Acad. Sci. Paris 361 (2023), 807-818. 11, 12

[34] X. Ren, *On radiuses of convergence of q-metallic numbers and related q-rational numbers*, Res. Number Theory 8s (2022). 11

[35] The On-Line Encyclopedia of Integer Sequences, OEIS Foundation Inc., oeis.org. 4, 5

[36] A. Sikora, *Tangle Equations, the Jones conjecture, slopes of surfaces in tangle complements, and q-deformed rationals*, arXiv:2005.08162. 11, 12

[37] A. Sokal, *A simple algorithm for expanding a power series as a continued fraction*, Expo. Math. 41 (2023), 245-287. 2, 7
[38] T. Stieltjes, *Recherches sur les fractions continues*, Ann. Fac. Sci. Univ. Toulouse **8** (1894-1895), J1-J122; 9 A5-A47. 2

[39] W. J. Thron, *Some properties of continued fractions* $1 + d_0z + K(z/(1 + d_nz))$, Bull. Amer. Math. Soc. **54** (1948), 206-218. 12

[40] X. Viennot, *Une théorie combinatoire des polynômes orthogonaux généraux*, UQAM, Montréal, Québec, 1983. 2, 3

[41] Y. Wang, G. Xin, M. Zhai, *Hankel determinants and shifted periodic continued fractions*, Adv. in Appl. Math. **102** (2019), 83-112. 7, 8

VALENTIN OVSIENKO, CENTRE NATIONAL DE LA RECHERCHE SCIENTIFIQUE, LABORATOIRE DE MATHÉMATIQUES DE REIMS, UMR 9008 CNRS ET UNIVERSITÉ DE REIMS CHAMPAGNE-ARDENNE, U.F.R. SCIENCES EXACTES ET NATURELLES, MOULIN DE LA HOUSSE - BP 1039, 51687 REIMS CEDEX 2, FRANCE

Email address: valentin.ovsienko@univ-reims.fr

EMMANUEL PEDON, LABORATOIRE DE MATHÉMATIQUES DE REIMS, UMR 9008 CNRS ET UNIVERSITÉ DE REIMS CHAMPAGNE-ARDENNE, U.F.R. SCIENCES EXACTES ET NATURELLES, MOULIN DE LA HOUSSE - BP 1039, 51687 REIMS CEDEX 2, FRANCE

Email address: emmanuel.pedon@univ-reims.fr