# On the *q*-analogue of Pólya's Theorem

Alin Bostan, Sergey Yurkevich

► To cite this version:

Alin Bostan, Sergey Yurkevich. On the *q*-analogue of Pólya's Theorem. The Electronic Journal of Combinatorics, 2023. hal-03425997

HAL Id: hal-03425997

https://hal.science/hal-03425997

Submitted on 2 Apr 2023

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_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# On the q-analogue of Pólya's Theorem

Alin Bostan*

Inria Saclay
Saclay, France

alin.bostan@inria.fr

Sergey Yurkevich‡

University of Vienna, and
Inria Saclay
Vienna, Austria

sergey.yurkevich@univie.ac.at

Submitted: May 20, 2022; Accepted: Feb 23, 2023; Published: TBD
© The authors. Released under the CC BY-ND license (International 4.0).

## Abstract

We answer a question posed by Michael Aissen in 1979 about the q-analogue of a classical theorem of George Pólya (1922) on the algebraicity of (generalized) diagonals of bivariate rational power series. In particular, we prove that the answer to Aissen's question, in which he considers q as a variable, is negative in general. Moreover, we show that when q is a complex number, the answer is positive if and only if q is a root of unity.

**Mathematics Subject Classifications:** 05A30, 30B10

# 1 Introduction

A beautiful but rather unknown theorem of Pólya [9] states the following:

Given two algebraic power series<fnref n="1" /> $\varphi(x)$ and $\Phi(x)$, let $A_{(i,j)}$ be the coefficient of $x^j$ in $\Phi(x)\varphi(x)^i$. Consider a straight line in the plane and let $(p_n)_{n \ge 0}$ be the sequence of non-negative integer lattice points in $\mathbb{Z}^2$ lying on this line. Then
$$F(x) = \sum_{n \ge 0} A_{p_n} x^n \text{ is algebraic.}$$

In particular, this theorem implies that the generalized diagonal $\Delta_{a,b}$ of a bivariate rational power series is algebraic, where for $f(x, y) = \sum_{i,j \ge 0} f_{i,j} x^i y^j$, we define $\Delta_{a,b}(f) := \sum_{n \ge 0} f_{an,bn} x^n$. For example, one finds

$$\Delta_{1,1} \left( \frac{1}{1-x-y} \right) = \Delta_{1,1} \left( \sum_{i,j \ge 0} \binom{i+j}{i} x^i y^j \right) = \sum_{n \ge 0} \binom{2n}{n} x^n = \frac{1}{\sqrt{1-4x}},$$

<footnote>*Supported by DeRerumNatura ANR-19-CE40-0018.</footnote>

<footnote>‡Supported by DeRerumNatura ANR-19-CE40-0018, the DOC Fellowship (26101) of the Austrian Academy of Sciences ÖAW, and the Austrian Science Fund FWF (P-34765).</footnote>

<footnote n="1">¹Recall that $f(x) \in \mathbb{C}[x]$ is called *algebraic* if there exists a bivariate non-zero polynomial $P(x, z)$ in $\mathbb{C}[x, z]$ such that $P(x, f(x)) = 0$. A non-algebraic series is called *transcendental*.</footnote>
Fix integers $n, k, a, b$ with $n \ge k \ge 0, a \ge b \ge 0$ and $\gcd(a, b) = 1$. Moreover assume that either $n - a < k - b$ or $k - b < 0$. Let

$$F(x, q) := \sum_{j \ge 0} \begin{bmatrix} n + aj \\ k + bj \end{bmatrix}_q x^j \in \mathbb{C}[q][x].$$

Is the power series $F(x, q)$ algebraic? That is, does there exist a non-zero polynomial $P(x, q, z) \in \mathbb{C}[x, q, z]$ such that $P(x, q, F(x, q)) = 0$?

The inequality conditions $n \ge k \ge 0$ and $a \ge b \ge 0$ ensure that $F(x, q)$ is well-defined and not a polynomial. The condition $\gcd(a, b) = 1$ means that the line passing through the $q$-Pascal triangle does not “skip” terms; as we will see, it does not affect the algebraicity of $F(x, q)$. Also the condition $n - a < k - b$ or $k - b < 0$ is just a translation of the geometric picture that $F(x, q)$ collects all terms on that line. Aissen noticed the following fact: if the line is parallel to an edge of the $q$-Pascal triangle (i.e., if $a = b$ or $b = 0$), then $F(x, q)$ is trivially algebraic, because it is actually a rational function of $x$ and $q$. Hence, in what follows, we will assume that $a \ne b$ and $b \ne 0$. More precisely, we will only consider admissible integers $n, k, a, b$, in the following sense: $n \ge k \ge 0$, $a > b > 0$, $\gcd(a, b) = 1$, and either $n - k < a - b$ or $k < b$.

## 2 Results

Using elementary asymptotic estimates on the coefficients, we can show that the answer to Aissen’s question is negative, because for any fixed $z \in \mathbb{C}$ of absolute value larger than 1 the coefficients of $F(x, z)$ grow too fast for this series to be algebraic. However, we notice that the same argument does not apply for the univariate power series $h_z(x) := F(x, z)$, where $z \in \mathbb{C}$ with $|z| \le 1$. In fact, our main result (Theorem 4 below) is that $h_z(x)$ is algebraic if and only if $z$ is a root of unity.

We start with a particular case of our main result and the answer to Aissen’s question: the generating function of the central $q$-binomial coefficients is not algebraic.

**Proposition 1.** For $n = k = 0$ and $a = 2, b = 1$ the series $F(x, q)$ is not algebraic.

*Proof.* Assume that $F(x, q)$ is algebraic with minimal polynomial $P(x, q, z)$. Then the series $h_2(x) := F(x, 2)$ must be algebraic as well, since $P_2(x, z) := P(x, 2, z) \ne 0$ satisfies $P_2(x, h_2(x)) = 0$. We have

$$\begin{aligned} h_2(x) &= \sum_{j \ge 0} \frac{(2^{j+1}-1)(2^{j+2}-1)\cdots(2^{2j}-1)}{(2-1)(2^2-1)\cdots(2^j-1)} x^j \\ &= 1 + 3x + 35x^2 + 1395x^3 + 200787x^4 + \cdots. \end{aligned}$$

Using the obvious inequality $(2^{j+k} - 1)/(2^k - 1) > 2^j$, we see that the $j$-th coefficient of $h_2(x)$ is greater than $2^{j^2}$. This growth rate is too fast for $h_2(x)$ to be algebraic, see e.g., Theorem D in [8], or Theorem 3 in [12]. □
A more elementary way to see that the growth rate of the coefficients of $h_2(x)$ is incompatible with algebraicity of the function is to notice that this rate is too fast even for D-finite functions. Recall [15] that a power series $f(x) = \sum_{i \ge 0} u_i x^i$ is called D-finite if it satisfies a linear differential equation with polynomial coefficients:

$$p_n(x)f^{(n)}(x) + \cdots + p_0(x)f(x) = 0.$$

A classical theorem ensures that any algebraic function is D-finite [15, Thm. 2.1] (see also [3]), whereas the latter class of functions is clearly much larger. An equivalent characterization of D-finite series [15, Thm. 1.5] states that the coefficients sequence satisfies a linear recurrence with polynomial coefficients:

$$u_{j+r}c_r(j) + \cdots + u_jc_0(j) = 0, \quad j \ge 0.$$

A sequence $(u_j)_{j \ge 0}$ is called P-recursive if it satisfies a recurrence as above.

A simple estimation on the growth rate of such sequences shows that any P-recursive sequence $(u_j)_{j \ge 0}$ grows at most like a power of $j!$ which is slower than $2^{j^2}$. We will use the fact that the coefficient sequence of an algebraic function is necessarily P-recursive again later.

We have just proved that the bivariate series $F(x, q)$ cannot be algebraic for all admissible $n, k, a, b$. In the same manner, we can prove that $F(x, q)$ is not algebraic for any admissible $n, k, a, b$. This is easily reduced to the following task: when is the univariate power series $h_z(x) := F(x, z)$ (for a fixed $z \in \mathbb{C} \setminus \{0\}$) algebraic? Obviously, the same argument as in the proof of Proposition 1 applies for any $z$ with $|z| > 1$: the growth rate of $z^{j^2}$ is incompatible with algebraicity. However, for $z = \omega$ on the unit circle or for $|z| < 1$ the same argument does not work; in fact we have the following result:

**Proposition 2.** Let $n, k, a, b$ be admissible integers and $\omega \in \mathbb{C}$ be a root of unity. Then $h_\omega(x)$ is algebraic.

Before proving it, we recall the $q$-Lucas theorem (see [6, p. 22] for an algebraic proof and [13, p. 131–132] for a combinatorial proof). It is the $q$-analogue of the well-known Lucas theorem, one form of which states that

$$\binom{n}{m} \equiv \binom{\lfloor \frac{n}{p} \rfloor}{\lfloor \frac{m}{p} \rfloor} \cdot \binom{n - p \lfloor \frac{n}{p} \rfloor}{m - p \lfloor \frac{m}{p} \rfloor} \mod p,$$

where $p$ is a prime number and $m, n$ are non-negative integers; here $\lfloor x \rfloor$ denotes the integer part of $x$, that is the largest integer at most equal to $x$.

**Theorem 3 (q-Lucas Theorem).** Let $x, y$ be non-negative integers and $\omega \in \mathbb{C}$ be a root of unity of order $s$. Then

$$\begin{bmatrix} x \\ y \end{bmatrix}_{\omega} = \begin{pmatrix} \lfloor \frac{x}{s} \rfloor \\ \lfloor \frac{y}{s} \rfloor \end{pmatrix} \cdot \begin{bmatrix} x - s \lfloor \frac{x}{s} \rfloor \\ y - s \lfloor \frac{y}{s} \rfloor \end{bmatrix}_{\omega}.$$
Now we can show that for roots of unity $\omega \in \mathbb{C}$, the series $h_{\omega}(x)$ is algebraic.

*Proof of Proposition 2.* Let $s$ be the order of $\omega$. We have

$$h_{\omega}(x) = \sum_{j \ge 0} \begin{bmatrix} n + aj \\ k + bj \end{bmatrix}_{\omega} x^j = \sum_{r=0}^{s-1} \sum_{j \ge 0 \pmod s} \begin{bmatrix} n + aj \\ k + bj \end{bmatrix}_{\omega} x^j.$$

Let us examine the $s$ summands separately using the $q$-Lucas theorem:

$$\begin{align*}
\sum_{\substack{j \ge 0 \\ j \equiv r \pmod s}} \begin{bmatrix} n + aj \\ k + bj \end{bmatrix}_{\omega} x^j &= \sum_{\ell \ge 0} \begin{bmatrix} n + a(\ell s + r) \\ k + b(\ell s + r) \end{bmatrix}_{\omega} x^{\ell} \\
&= \sum_{\ell \ge 0} \left( \begin{bmatrix} \frac{n+ar}{s} \\ \frac{k+br}{s} \end{bmatrix} + a\ell \right) \begin{bmatrix} n + ar - s\left\lfloor \frac{n+ar}{s} \right\rfloor \\ k + br - s\left\lfloor \frac{k+br}{s} \right\rfloor \end{bmatrix}_{\omega} x^{\ell} \\
&= \begin{bmatrix} n + ar - s\left\lfloor \frac{n+ar}{s} \right\rfloor \\ k + br - s\left\lfloor \frac{k+br}{s} \right\rfloor \end{bmatrix}_{\omega} \cdot \sum_{\ell \ge 0} \left( \begin{bmatrix} \frac{n+ar}{s} \\ \frac{k+br}{s} \end{bmatrix} + a\ell \right) x^{\ell}.
\end{align*}$$

By Pólya's theorem (see Section 1) the last sum is an algebraic series, and therefore obviously the whole last expression is also algebraic. Then, $h_{\omega}(x)$ is the sum of $s$ algebraic power series, hence it is algebraic as well. □

In the remaining part of the article we will show that if $0 < |z| \le 1$ but $z$ is not a root of unity, then $h_z(x)$ cannot algebraic. This will prove our main theorem:

**Theorem 4.** Let $n, k, a, b$ be admissible integers and let $q \in \mathbb{C} \setminus \{0\}$. Then $h_q(x)$ is an algebraic power series if and only if $q$ is a root of unity.

A natural approach to prove this theorem is to use a result originating from Ramis' work [11], see also [14, Corollary 2], or [2, Theorem 7.1]. It says that if a function $f$ is algebraic and at the same time satisfies a linear $q$-difference equation, that is, an equation of the form

$$f(q^m x) + b_{m-1}(x)f(q^{m-1}x) + \cdots + b_0(x)f(x) = 0$$

for some rational functions $b_0, \dots, b_m \in \mathbb{C}(x)$ not all zero and $q \in \mathbb{C} \setminus \{0\}$ not a root of unity, then $f$ is actually a rational function. Clearly, $h_q(x)$ satisfies a linear $q$-difference equation. Hence, the result described above ensures that if $h_q(x)$ is algebraic, it must already be a rational function. One can prove that for any non-zero $q$, $h_q(x)$ is rational if and only if $a = b$ or $b = 0$. Then, altogether, these facts imply Theorem 4.

It turns out that a simple modification of the proof that $h_q(x)$ is never rational for admissible integers already implies a much more general fact which does not require the theory of $q$-difference equations in order to prove our main theorem. More precisely, we will prove directly the following stronger result.

**Theorem 5.** Let $n, k, a, b$ be admissible integers and let $q \in \mathbb{C} \setminus \{0\}$. Then $h_q(x)$ is D-finite if and only if $q$ is a root of unity.
Recall that an algebraic function is always D-finite, therefore Theorem 5 along with Proposition 2 will allow us to conclude the validity of Theorem 4.

We will make use of the following elementary proposition, that we suspect to be well-known although we could not locate it in the literature.

**Proposition 6.** Let $p(x, y) \in \mathbb{C}[x, y]$ be a bivariate polynomial and assume that for some $q \in \mathbb{C} \setminus \{0\}$ not a root of unity, we have $p(j, q^j) = 0$ for all $j \in \mathbb{N}$. Then $p(x, y) = 0$.

*Proof.* We distinguish three cases: $|q| < 1$, $|q| = 1$ and $|q| > 1$. For the first case, write $p(x, y) = p_0(x) + r(x, y)y^n$ for some natural number $n$ and $p_0(x) = p(x, 0) \in \mathbb{C}[x]$, $r(x, y) \in \mathbb{C}[x, y]$ such that $r(x, 0) \neq 0$. It follows that

$$0 = p(j, q^j) = p_0(j) + r(j, q^j)q^{nj}.$$

Since $|q| < 1$, we must have $r(j, q^j)q^{nj} \to 0$ as $j \to \infty$. Therefore, $\lim_{j \to \infty} p_0(j) = 0$ and we obtain that $p_0(x) = 0$. Hence, $r(j, q^j) = 0$ for $j \ge 0$. But $r(x, y) = r_0(x) + s(x, y)y$ for some polynomial $s(x, y)$ and non-zero $r_0(x)$. By the same argument, $\lim_{j \to \infty} r_0(j) = 0$, however this contradicts $r_0(x) \neq 0$.

If $|q| = 1$, write $p(x, y) = p_0(y) + p_1(y)x + \dots + p_d(y)x^d$ for some natural number $d$ and polynomials $p_0(y), \dots, p_d(y) \in \mathbb{C}[y]$, such that $p_d(y) \neq 0$. We have

$$|p_d(q^j)|^{d^2} = \left| \sum_{k=0}^{d^2-1} p_k(q^j) j^k \right| \quad (1)$$

Now the idea is that for some sequence $(j_n)_{n \ge 0}$, the terms $|p_0(q^{j_n})|, \dots, |p_{d-1}(q^{j_n})|$ can be bounded by a constant from above and $|p_d(q^{j_n})|$ is bounded from below by a non-zero constant – this contradicts (1) because the left-hand side becomes too large. More precisely, choose $\xi$ on the unit circle which is not a root of $p_d(x)$. Then there exists $\varepsilon > 0$ such that $|p_k(\xi)| < 1/\varepsilon$ for all $k = 0, \dots, d$ and also $\varepsilon < |p_d(\xi)|$. Moreover, since $q$ is not a root of unity, Jacobi's Theorem implies that the set $\{q^j | j \in \mathbb{N}\}$ is dense on the unit circle [7, Thm 3.13] (see also [5]), consequently there are infinitely many $j$ such that $q^j$ is arbitrarily close to $\xi$. Henceforth, there also exist infinitely many $j$ for which $|p_k(q^j)| < 1/\varepsilon$ for all $k = 0, \dots, d-1$ and $\varepsilon < |p_d(q^j)|$. However, at the sequence of these $j$, this contradicts (1) since then the left-hand side grows at least like $j^d\varepsilon$ and the right-hand side is bounded by $dj^{d-1}/\varepsilon$.

Finally, if $|q| > 1$, write $p(x, y) = r_0(x) + r_1(x)y + \dots + r_n(x)y^n$ for polynomials $r_0(x), \dots, r_n(x) \in \mathbb{C}[x]$ and some natural number $n$. Clearly, if $p(x, y)$ is non-zero, $n$ must be positive. But then we have

$$|r_0(j) + r_1(j)q^j + \dots + r_{n-1}(j)q^{(n-1)j}| \le c j^m |q|^{(n-1)j},$$

for some constants $c, m > 0$. This contradicts

$$r_n(j)q^{nj} = -r_0(j) - r_1(j)q^j - \dots - r_{n-1}(j)q^{(n-1)j}$$

for big enough $j$ and finishes the proof. □
Remark 7. An alternative, purely algebraic, proof of Proposition 6 follows from the fact that for any $d \ge 0$, writing $D = \binom{d+2}{2}$, the determinant of the $D \times D$ matrix

$$M(z) = (n^i z^{nj})_{\substack{0 \le i + j \le d, \\ 1 \le n \le D}}$$

is given by a constant times a power of $z$ and a product of cyclotomic polynomials in $z$. More precisely, assuming that the total degree of $p(x, y) = \sum_{i,j} c_{i,j} x^i y^j$ is $d$, the equations $p(j, q^j) = 0$ for $j = 1, \dots, D$ yield the following linear system of equations for the vector of unknowns $c_{i,j}$:

$$M(q) \cdot (c_{i,j})_{0 \le i + j \le d} = 0.$$

To see why $\det M(z)$ only vanishes for $z$ a root of unity, it is useful to write $M(z) = N(1, z, \dots, z^d)$, where $N(z_0, \dots, z_d) = (n^i z_j^n)_{\substack{0 \le i + j \le d, \\ 1 \le n \le D}}$. Then it remains to prove that $\det N(z_0, \dots, z_d)$ is a constant times a product of $z_i$'s times a product of $(z_i - z_j)$ for $i \ne j$. This follows from the observation that the transpose of $N$ is a generalized Vandermonde matrix; more precisely, it is a matrix corresponding to the linear map from the space of polynomials with no constant term and degree at most $D$ to $\mathbb{C}^D$ given by

$$P(x) \mapsto (P(z_0), \dots, P(z_d), \vartheta P(z_0), \dots, \vartheta P(z_{d-1}), \dots, \vartheta^d P(z_0)),$$

where $\vartheta = x^{\frac{x}{dx}}$ is the Euler derivative. After a change of basis from the monomials to the basis $1, (x - z_0), (x - z_0)(x - z_1), \dots, (x - z_0)^{d-1}(x - z_1)^{d-1}(x - z_2)^{d-2} \dots (x - z_d)$ the matrix becomes lower-triangular and the determinant evaluation follows trivially. This purely algebraic proof shows that in Proposition 6 one can replace “for all $j \in \mathbb{N}$” by the weaker condition “for $j = 1, \dots, (d+1)(d+2)/2$, where $d$ is the total degree of $p(x, y)$”. The proof also shows that the conclusion of the proposition holds as well if $q \in \mathbb{C} \setminus \{0\}$ is assumed not to be a root of unity of order at most $d$.

Note that Proposition 6 immediately implies that the function $f(x) = q^x$ is transcendental for any non-zero $q \in \mathbb{C}$ which is also not a root of unity, because an annihilating polynomial $P(x, z)$ would need to satisfy $P(x, q^x) = 0$ and hence this would hold at all integers $x$. In particular, this proposition contains the classical and well-known fact that $\exp(x)$ is not algebraic.

Now we are ready to prove Theorem 5: we will show that $h_q(x)$ is D-finite (and hence algebraic) if and only if $q$ is a root of unity. This answers Aissen's question completely.

*Proof of Theorem 5.* We already observed that if $q$ is a root of unity, the series $h_q(x)$ is algebraic and hence D-finite. Therefore, one direction is clear and we assume now that $q \in \mathbb{C} \setminus \{0\}$ is not a root of unity.

Assume by contradiction that $h_q(x) = \sum_{j \ge 0} u_j x^j$ is D-finite. Then $(u_j)_{j \ge 0}$ is P-recursive and there exist a positive integer $r$ and $c_0(x), \dots, c_r(x) \in \mathbb{C}[x]$ with $c_0(x)c_r(x) \ne 0$ such that

$$u_{j+r}c_r(j) + \dots + u_jc_0(j) = 0, \quad \text{for all } j \ge 0. \qquad (2)$$
A simple computation shows that

$$u_{j+1} = u_j \frac{\prod_{\ell=1}^{a} (q^{n+aj+\ell} - 1)}{\prod_{\ell=1}^{b} (q^{k+b(j+m)+\ell} - 1) \prod_{\ell=1}^{a-b} (q^{n-k+(a-b)(j+m)+\ell} - 1)}.$$

Then it follows by iteration

$$\begin{aligned} u_{j+i} &= u_j \prod_{m=0}^{i-1} \frac{\prod_{\ell=1}^{a} (q^{n+a(j+m)+\ell} - 1)}{\prod_{\ell=1}^{b} (q^{k+b(j+m)+\ell} - 1) \prod_{\ell=1}^{a-b} (q^{n-k+(a-b)(j+m)+\ell} - 1)} \\ &= u_j \frac{\prod_{\ell=1}^{i a} (q^{n+aj+\ell} - 1)}{\prod_{\ell=1}^{i b} (q^{k+bj+\ell} - 1) \prod_{\ell=1}^{i (a-b)} (q^{n-k+(a-b)j+\ell} - 1)} \end{aligned}$$

Using this, we may rewrite equation (2) and obtain

$$u_j \left( \sum_{i=0}^{r} c_i(j) \frac{\prod_{\ell=1}^{i a} (q^{n+aj+\ell} - 1)}{\prod_{\ell=1}^{i b} (q^{k+bj+\ell} - 1) \prod_{\ell=1}^{i (a-b)} (q^{n-k+(a-b)j+\ell} - 1)} \right) = 0, \quad (3)$$

for all integers $j \ge 0$. Note that $u_j \ne 0$, since $q$ is not a root of unity, hence already the sum above is identical to 0 for all $j \in \mathbb{N}$. We define

$$P_i(y) := \prod_{\ell=1}^{i a} (y^a q^{n+\ell} - 1) \prod_{\ell=ib+1}^{r b} (y^b q^{k+\ell} - 1) \prod_{\ell=i(a-b)+1}^{r(a-b)} (y^{a-b} q^{n-k+\ell} - 1) \in \mathbb{C}[y],$$

so that after multiplication with the common denominator, equation (3) implies that $\sum_{i=1}^r c_i(j)P_i(q^j) = 0$. By Proposition 6 we now obtain that $p(x, y) := \sum_{i=1}^r c_i(x)P_i(y)$ must be identically 0.

We will show however that $p(x, y)$ cannot be the zero polynomial if the integers $n, k, a, b$ are admissible, more precisely if $a > b > 0$. Set first $d := \max(\deg(c_i(x)), i = 0, \dots, r)$ and write $c_i(x) = \sum_{k=0}^d c_{i,k}x^k$ for some $c_{i,k} \in \mathbb{C}$. Moreover, let $m$ be an integer such that $c_{r,m} \ne 0$ and denote by $p_m(y)$ the coefficient of $x^m$ in $p(x, y)$. We claim that $p_m(y) \ne 0$. We namely have:

$$p_m(y) = \sum_{i=0}^{r} c_{i,m} \prod_{\ell=1}^{i a} (y^a q^{n+\ell} - 1) \prod_{\ell=ib+1}^{r b} (y^b q^{k+\ell} - 1) \prod_{\ell=i(a-b)+1}^{r(a-b)} (y^{a-b} q^{n-k+\ell} - 1),$$

and the exponent of $y$ of the leading monomial of each summand is $ia^2 + (r-i)b^2 + (r-i)(a-b)^2$. Since we assume that $a > b > 0$, it follows that this expression is maximal only for $i=r$, and hence the leading monomial of $p_m(y)$ is $c_{r,m}y^{a^2r}q^{ran+ra ra+1}/2 \ne 0$. $\square$

**Acknowledgements.** We thank the anonymous referees for helpful suggestions.
## References

[1] M. Aissen. Variations on a theme of Pólya. In *Second International Conference on Combinatorial Mathematics (New York, 1978)*, volume 319 of Ann. New York Acad. Sci., pages 1-6. 1979.

[2] J.-P. Bézivin and A. Boutabaa. Sur les équations fonctionnelles p-adiques aux q-différences. *Collect. Math.*, 43(2):125-140, 1992.

[3] A. Bostan, F. Chyzak, G. Lecerf, B. Salvy, and E. Schost. Differential equations for algebraic functions. In *ISSAC 2007*, pages 25-32. ACM, New York, 2007.

[4] M. Capobianco, S. Maurer, D. McCarthy, and J. Molluzzo. A collection of open problems. *Annals of the New York Academy of Sciences*, 319(1):565-592, 1979.

[5] A. Denjoy. Sur les courbes definies par les équations différentielles à la surface du tore. *J. Math. Pures Appl. (9)*, 11:333-375, 1932.

[6] J. Désarménien. Un analogue des congruences de Kummer pour les $q$-nombres d'Euler. *European J. Combin.*, 3(1):19-28, 1982.

[7] R. L. Devaney. *An introduction to chaotic dynamical systems*. Addison-Wesley Studies in Nonlinearity. Addison-Wesley Publishing Company, Advanced Book Program, Redwood City, CA, second edition, 1989.

[8] P. Flajolet. Analytic models and ambiguity of context-free languages. volume 49, pages 283-309. 1987. Twelfth international colloquium on automata, languages and programming (Nafplion, 1985).

[9] G. Pólya. Sur les séries entières, dont la somme est une fonction algébrique. *Enseignement Math.*, 22:38-47, 1921/1922.

[10] G. Pólya. On the number of certain lattice polygons. *J. Combinatorial Theory*, 6:102-105, 1969.

[11] J.-P. Ramis. About the growth of entire functions solutions of linear algebraic $q$-difference equations. *Ann. Fac. Sci. Toulouse Math. (6)*, 1(1):53-94, 1992.

[12] T. Rivoal and J. Roques. Hadamard products of algebraic functions. *J. Number Theory*, 145:579-603, 2014.

[13] B. E. Sagan. Congruence properties of $q$-analogs. *Adv. Math.*, 95(1):127-143, 1992.

[14] R. Schäfke and M. Singer. Consistent systems of linear differential and difference equations. *J. Eur. Math. Soc. (JEMS)*, 21(9):2751-2792, 2019.

[15] R. P. Stanley. Differentiably finite power series. *European J. Combin.*, 1(2):175-188, 1980.