This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Computing with D-Algebraic Sequences

Bertrand Teguia Tabuguia
Abstract

A sequence is difference algebraic (or D-algebraic) if finitely many shifts of its general term satisfy a polynomial relationship; that is, they are the coordinates of a generic point on an affine hypersurface. The corresponding equations are called algebraic difference equations (ADE). We show that subsequences of D-algebraic sequences, indexed by arithmetic progressions, satisfy ADEs of the same orders as the original sequences. Additionally, we provide algorithms for operations with D-algebraic sequences and discuss the difference-algebraic nature of holonomic and C2C^{2}-finite sequences.

keywords:
Affine D-algebraic sequence, subsequence, radical-rational dynamical system

1 Introduction

Some well-known nonlinear recurrence relations arose with the Babylonian (or Heron’s) method and Aitken extrapolation. The latter was introduced to estimate limits of convergent sequences. To a sequence of general term s(n)s(n), the Δ2\Delta^{2} process, or Aitken’s transformation [Ait27], associates the term

t(n)=s(n)(Δs(n))2Δ2s(n)=s(n)(s(n+1)s(n))2s(n+2)2s(n+1)+s(n),t(n)=s(n)-\frac{(\Delta s(n))^{2}}{\Delta^{2}s(n)}=s(n)-\frac{\left(s(n+1)-s(n)\right)^{2}}{s(n+2)-2\,s(n+1)+s(n)}, (1)

to accelerate the rate of convergence to limns(n)<\lim_{n\to\infty}s(n)<\infty. As discussed in [Wen89], this transformation has numerous applications in theoretical physics and other sciences [BJ75, Bre85]. This paper presents a general study of a class of sequences that remains unchanged by such transformations. These sequences satisfy nonlinear rational or polynomial recursions, similar to the one presented in (1).

As an example, consider approximating 3\sqrt{3} using the Babylonian method. The iteration is governed by the recursion

s(n+1)=12(s(n)+3s(n)),s(n+1)=\frac{1}{2}\left(s(n)+\frac{3}{s(n)}\right), (2)

with the chosen initial term s(0)=1s(0)=1. Using our result, we can systematically show that the Aitken transformation yields the sequence with initial term t(0)=95t(0)=\frac{9}{5} and recursion

t(n+1)=6t(n)t(n)2+3=6t(n)+3t(n).t(n+1)=\frac{6\,t(n)}{t(n)^{2}+3}=\frac{6}{t(n)+\frac{3}{t(n)}}. (3)

The above may be generalized to any square root computation. Equations similar to (2) also appear in modeling, as illustrated with the discrete May-Leonard model by Roeger and Allen [RA04].

Following J. F. Ritt’s algebraic approach to differential equations [Rit50], the study of associated objects such as differential polynomials and differential varieties was further developed by Raudenbush [Rau34], Rosenfeld [Ros59], and, more comprehensively with modern mathematics, by Kolchin [Kol73]. For difference equations, which relate to the classical Δ\Delta operator defined as Δf(x)f(x+1)f(x)\Delta f(x)\coloneqq f(x+1)-f(x), R. Cohn developed much of the theory [Coh65].

A key result of R. Cohn states that every nontrivial ordinary algebraically irreducible difference polynomial admits an abstract solution [Coh48]. This theorem has important implications for sequences over an algebraically closed field, say 𝕂\mathbb{K}, of characteristic zero. Indeed, specialized to the difference ring 𝕂\mathbb{K}^{\mathbb{N}} (with the monoid of natural integers ={0,1,}\mathbb{N}=\{0,1,\ldots\}), Cohn’s theorem ensures the existence of sequences that are zeros of ordinary difference polynomial. We call them difference-algebraic (or D-algebraic) sequences and denote their set by 𝕂0\mathbb{K}^{\aleph_{0}} (see Definition 2.8).

D-algebraic functions [AEMSTT24, TT25] generalize functions defined by polynomial differential equations, encompassing classes such as D-finite functions [Kau23] and differentially definable functions [JPPS20] (see also [TTK21] for related power series). Similarly, D-algebraic sequences generalize sequences defined by polynomial equations involving their shifts and the index variable. These sequences arise naturally in computer science, for example, in the context of cost-register automata [ADD+13] and polynomial automata [BDSW17] over a unary alphabet. A particularly important subclass of D-algebraic sequences consists of the simple-rational recursive sequences, which are the zeros of difference polynomials linear in their highest shifts (l.h.s. difference equations) [CDBMP23]. It was shown in [TTW24] that any D-finite (holonomic or P-recursive) sequence satisfies an l.h.s. difference equation of order bounded by the sum of its holonomic degree and order. We provide a corrected proof of this statement here, as an error was inadvertently introduced in the final version of [TTW24]. Another notable subclass of D-algebraic sequences is that of C2C^{2}-finite sequences, introduced by Jiminez-Pastor, Nuspl, and Pillwein in [JPNP23]. We will give a constructive proof of their D-algebraicity.

This paper demonstrates that difference-algebraic sequences behave well under field operations (with a mild assumption for division) thanks to our algorithm for performing arithmetic operations on them. Our method is based on the differential elimination-prolongation method developed by Ovchinnikov, Pogudin, and Vo [OPV16], which was adapted to the difference algebra setting in [OPS20] (see also [GVDHYZ09]). Wibmer introduced a notion of dimension for systems of algebraic difference equations with solutions in sequence rings, showing that this dimension need not be an integer [Wib21]. We emphasize that the consistency of the systems of algebraic difference equations resulting from our arithmetic operations follows from Cohn’s existence theorem applied to the individual input difference polynomials, thereby avoiding the undecidability results of [PSW20]. While the computational theory for the differential case is relatively well-established (see, e.g., [BLOP95, Rob14, vDH19, TT25] and references therein), an effective theory for the arithmetic of (nonlinear) difference-algebraic sequences has received less attention. This motivates the present work. In addition to field operations, we prove that D-algebraic sequences are closed under partial sums, partial products, radicals, and composition with arithmetic progressions. This last result can be extended to composition with broader classes of strictly increasing integer sequences. We are unaware of comparable results for such compositions, and we consider our method for computing equations for D-algebraic subsequences a key contribution.

We conclude this introduction with a simple example illustrating our algorithm for the arithmetic of D-algebraic sequences.

Example 1.1.

We here compute an algebraic difference equation satisfied by the product of a Fibonacci sequence, i.e., a solution of the equation s(n+2)=s(n+1)+s(n)s(n+2)=s(n+1)+s(n), and k2nk^{2^{n}}, for some constant kk, i.e., a solution of the equation s(n+1)=s(n)2s(n+1)=s(n)^{2}. Using our algorithm, we find the following third-order algebraic difference equation

s(n+3)3s(n)6s(n+3)2s(n+2)2s(n+1)s(n)4+s(n+2)7s(n)23s(n+3)s(n+2)4s(n+1)2s(n)25s(n+3)2s(n+2)s(n+1)4s(n)2+s(n+3)2s(n+1)74s(n+3)s(n+2)3s(n+1)5+4s(n+2)6s(n+1)3=0.-s(n+3)^{3}s(n)^{6}-s(n+3)^{2}s(n+2)^{2}s(n+1)s(n)^{4}+s(n+2)^{7}s(n)^{2}-3s(n+3)s(n+2)^{4}s(n+1)^{2}s(n)^{2}-5s(n+3)^{2}s(n+2)s(n+1)^{4}s(n)^{2}+s(n+3)^{2}s(n+1)^{7}-4s(n+3)s(n+2)^{3}s(n+1)^{5}+4s(n+2)^{6}s(n+1)^{3}=0. (4)

The above equation provides three possible continuations for the sequence, but the original two equations determine the correct one, thus defining a recursion for the entire sequence. The results in [CDBMP23] imply that whenever we have two initial equations that are linear in their highest shifts (l.h.s.), a higher-order l.h.s. difference equation can be derived for the arithmetic of their zeros. In this case, we obtain a fourth-order l.h.s. equation. \blacksquare

The NLDE package [TT23] contains a sub-package DalgSeq dedicated to the use of nonlinear algebra for difference equations. Most of the algorithms highlighted in this paper are implemented in DalgSeq available at https://github.com/T3gu1a/D-algebraic-functions.

2 Definitions

In this section, we fix some notations and establish a formal definition of a difference-algebraic sequence from the difference algebra setting. For further details on this theoretical perspective, we refer the reader to [Coh65, Lev08].

Definition 2.1.

A difference ring is a pair (R,Σ)(R,\Sigma) where RR is a commutative ring and Σ\Sigma is a finite set of pairwise commuting RR-endomorphisms.

A difference ideal of (R,Σ)(R,\Sigma) is an ideal JJ of RR such that σ(J)J\sigma(J)\subset J for all σΣ\sigma\in\Sigma. The difference ring (R,Σ)(R,\Sigma) is also denoted Σ\Sigma-ring RR. When Σ={σ}\Sigma=\{\sigma\}, the Σ\Sigma-ring RR is simply denoted σ\sigma-ring and said to be ordinary. When |Σ|>1\left|\Sigma\right|>1, RR is a partial difference ring. In this paper, we restrict ourselves to ordinary difference rings. We denote by \mathbb{N} the set of non-negative integers.

We primarily consider the σ\sigma-ring (𝕂,σ)(\mathbb{K},\sigma), where 𝕂\mathbb{K} is an algebraically closed field of characteristic zero and σ\sigma is the identity on 𝕂\mathbb{K}.

Definition 2.2.

The ring of difference polynomials in one difference indeterminate xx over 𝕂\mathbb{K} , also called the free difference 𝕂\mathbb{K}-algebra in xx, is the difference ring (𝕂[x0,x1,x2,],σ~)\left(\mathbb{K}[x_{0},x_{1},x_{2},\ldots],\tilde{\sigma}\right), where σ~\tilde{\sigma} extends σ\sigma as follows: σ~(a)=σ(a)=a\tilde{\sigma}(a)=\sigma(a)=a, for any a𝕂a\in\mathbb{K}, and σ~(xj)=xj+1\tilde{\sigma}(x_{j})=x_{j+1}, jj\in\mathbb{N}. For simplicity, this difference ring is denoted by 𝒟σ(𝕂,x)𝕂[σj(x)j]\mathcal{D}_{\sigma}(\mathbb{K},x)\coloneqq\mathbb{K}\left[\sigma^{j}(x)\mid j\in\mathbb{N}\right] or 𝕂[σ(x)]\mathbb{K}\left[\sigma^{\infty}(x)\right] with the property σj+1(x)=σ(σj(x)),j\sigma^{j+1}(x)=\sigma(\sigma^{j}(x)),j\in\mathbb{N}.

Definition 2.3.

A difference polynomial p𝒟σ(𝕂,x)p\in\mathcal{D}_{\sigma}(\mathbb{K},x) is said to be in normal form when xx effectively occurs as the smallest shift in pp. The order of a difference polynomial p𝒟σ(𝕂,x)p\in\mathcal{D}_{\sigma}(\mathbb{K},x), denoted ord(p)\operatorname{ord}(p), is the maximum jj\in\mathbb{N} such that σj(x)\sigma^{j}(x) appears in the normal form of pp. The degree of pp denoted deg(p)\deg(p) is the total degree of pp (in normal form) as a polynomial in the algebraic polynomial ring 𝕂[x,σ(x),,σord(p)(x)]\mathbb{K}[x,\sigma(x),\ldots,\sigma^{\operatorname{ord}(p)}(x)]. We say that pp is l.h.s. (linear in its highest shift) when the degree of pp with respect to σord(p)(x)\sigma^{\operatorname{ord}(p)}(x) is 11.

Observe that the order of a difference polynomial is unchanged by application of σ\sigma. To any difference polynomial p𝒟σ(𝕂,x)p\in\mathcal{D}_{\sigma}(\mathbb{K},x), we associate a recurrence equation called algebraic difference equation obtained by the equality p=0p=0.

Example 2.4.

We give the orders and degrees of the input recurrence equations in Example 1.1. We can always assume that 𝕂\mathbb{K} is the field of complex number \mathbb{C}. For pσ2(x)σ(x)x,ord(p)=2p\coloneqq\sigma^{2}(x)-\sigma(x)-x,\operatorname{ord}(p)=2 and deg(p)=1\deg(p)=1. For qσ2(x)σ(x)2q\coloneqq\sigma^{2}(x)-\sigma(x)^{2}, ord(q)=1\operatorname{ord}(q)=1 and deg(q)=2\deg(q)=2. \blacksquare

In classical algebraic geometry, zeros of polynomials over 𝕂\mathbb{K} correspond to points in 𝕂N\mathbb{K}^{N}, the affine NN-space over 𝕂\mathbb{K}, for some fixed N{0}N\in\mathbb{N}\setminus\{0\}, defining algebraic sets or varieties with the ideals of those polynomials. In our setting, the corresponding points may be regarded with denumerable coordinates as we want any zero of p𝒟σ(𝕂,x)p\in\mathcal{D}_{\sigma}(\mathbb{K},x) to have coordinates that vanish σj(p)\sigma^{j}(p), for all jj\in\mathbb{N}. Every such point defines a sequence over 𝕂\mathbb{K}. We denote the set of such sequences over 𝕂\mathbb{K} by 𝕂0\mathbb{K}^{\aleph_{0}}, where 0\aleph_{0} is aleph zero, the cardinality of \mathbb{N}. This makes sense of the passage from a finite to an infinite (countable) number of coordinates. Note that 𝕂0𝕂\mathbb{K}^{\aleph_{0}}\subset\mathbb{K}^{\mathbb{N}}, and the inclusion is strict since (nn)n(n^{n})_{n\in\mathbb{N}} is not a zero of a difference polynomial. In Section 3.1, we will see that 𝕂0\mathbb{K}^{\aleph_{0}} has the structure of a difference ring. This fact is used in Definition 2.6. This means that ring operations are defined componentwise, and for (s(n))n=(s(0),s(1),s(2),)𝕂0(s(n))_{n\in\mathbb{N}}=(s(0),s(1),s(2),\ldots)\in\mathbb{K}^{\aleph_{0}} (we also use the notation (s(n))n(s(n))_{n}), we consider the endomorphism σ\sigma^{\prime} such that σ((s(n))n)=(s(n+1))n\sigma^{\prime}((s(n))_{n\in\mathbb{N}})=(s(n+1))_{n\in\mathbb{N}}. This σ\sigma^{\prime} is often known as the shift operator. Observe that Δ=σid\Delta=\sigma^{\prime}-\text{id}. The following definition helps to clarify the correspondence between the zeros of difference polynomials and 𝕂0\mathbb{K}^{\aleph_{0}}.

Definition 2.5.

A homomorphism of difference rings (R1,σ1)(R_{1},\sigma_{1}) and (R2,σ2)(R_{2},\sigma_{2}) is a ring-homomorphism φ:R1R2\varphi\colon R_{1}\longrightarrow R_{2} such that φσ1=σ2φ\varphi\circ\sigma_{1}=\sigma_{2}\circ\varphi.

Definition 2.6.

Let p𝒟σ(𝕂,x)p\in\mathcal{D}_{\sigma}(\mathbb{K},x) and (s(n))n(𝕂0,σ)(s(n))_{n\in\mathbb{N}}\in(\mathbb{K}^{\aleph_{0}},\sigma^{\prime}) as previously defined. We say that (s(n))n(s(n))_{n\in\mathbb{N}} is a generic zero of pp if, under the unique homomorphism of difference rings 𝒟σ(𝕂,x)(𝕂0,σ)\mathcal{D}_{\sigma}(\mathbb{K},x)\longrightarrow~{}(\mathbb{K}^{\aleph_{0}},\sigma^{\prime}) given by the extension that sends xx to (s(n))n(s(n))_{n\in\mathbb{N}}, pp is sent to 0.

We emphasize that our choice of the ground difference field 𝕂\mathbb{K} with the identity endomorphism puts no distinction between the concept of solutions, formal solutions, or generic zeros of difference polynomials over 𝕂\mathbb{K}; see the details in [Lev08, Section 2.2].

Finally, we can define a difference-algebraic sequence based on the following corollary of R. Cohn’s existence theorem for ordinary difference polynomials.

Theorem 2.7.

[Coh48, Theorem IV] Every difference polynomial in 𝒟σ(𝕂,x)𝕂\mathcal{D}_{\sigma}(\mathbb{K},x)\setminus\mathbb{K} has a generic zero.

Definition 2.8.

A difference-algebraic sequence over 𝕂\mathbb{K} is a generic zero of some non-constant difference polynomial over 𝕂\mathbb{K}.

We view 𝕂0\mathbb{K}^{\aleph_{0}} as the set of affine D-algebraic sequences, which we will simply refer to as D-algebraic sequences, as these are our sole focus. Consider a difference polynomial p𝒟σ(𝕂,x)p\in\mathcal{D}_{\sigma}(\mathbb{K},x) of order rr and degree dd. When pp is algebraically irreducible over 𝕂[x,σ(x),,σr(x)]\mathbb{K}[x,\sigma(x),\ldots,\sigma^{r}(x)], its zeros are said to be defined by it. In this case, the D-algebraic sequences defined by pp are also said to be of order rr and degree dd. Note that if r>0r>0 or d>1d>1, then there are infinitely many points in 𝕂0\mathbb{K}^{\aleph_{0}} that are zeros of pp.

Remark 2.9.
  • With the above definition of a difference-algebraic sequence, it is convenient to look at a difference polynomial p𝒟σ(𝕂,x)p\in\mathcal{D}_{\sigma}(\mathbb{K},x) as the specialized (see [PSW20]) difference polynomial p𝔻s𝕂[σj(s(n))|j]p\in\mathbb{D}_{s}\coloneqq\mathbb{K}[\sigma^{j}(s(n))|j\in\mathbb{N}], where s(n)s(n) (symbolically) represents the general term of a generic zero of pp. This will be used to avoid lengthy notations. We will often use the automorphism σ\sigma with the assumption that it is extended accordingly for 𝕂0\mathbb{K}^{\aleph_{0}}.

  • Let n1,n2,n3n_{1},n_{2},n_{3}\in\mathbb{N}, and gg be a bivariate rational function. To perform operations with the zeros of pP(x,σ(x),,σn1(x))p\coloneqq P(x,\sigma(x),\ldots,\sigma^{n_{1}}(x)), qQ(x,σ(x),,σn2(x))𝒟σ(𝕂,x)q\coloneqq Q(x,\sigma(x),\ldots,\sigma^{n_{2}}(x))\in\mathcal{D}_{\sigma}(\mathbb{K},x), we write p=P(s1(n),s1(n+1),,s1(n+n1))𝔻s1p=P(s_{1}(n),s_{1}(n+1),\ldots,s_{1}(n+n_{1}))\in\mathbb{D}_{s_{1}} and q=Q(s2(n),s2(n+1),,s2(n+n2))𝔻s2q=Q(s_{2}(n),s_{2}(n+1),\ldots,s_{2}(n+n_{2}))~{}\in~{}\mathbb{D}_{s_{2}}, with (s1(n))n(s_{1}(n))_{n\in\mathbb{N}} and (s2(n))n(s_{2}(n))_{n\in\mathbb{N}} standing for D-algebraic sequences defined by pp and qq, respectively. We aim to build tT(x,σ(x),,σn3(x))t\coloneqq T(x,\sigma(x),\ldots,\sigma^{n_{3}}(x)) (which may be regarded as T(s3(n),s3(n+1),,s3(n+n3))𝔻s3T(s_{3}(n),s_{3}(n+1),\ldots,s_{3}(n+n_{3}))\in\mathbb{D}_{s_{3}}) such that g(s1(n),s2(n))g(s_{1}(n),s_{2}(n)) is a generic zero of tt. We refer to the difference rings 𝔻s1,𝔻s2,𝔻s3\mathbb{D}_{s_{1}},\mathbb{D}_{s_{2}},\mathbb{D}_{s_{3}} as the corresponding specializations of 𝒟σ(𝕂,x)\mathcal{D}_{\sigma}(\mathbb{K},x). This notation is generalized for arbitrarily many difference polynomials.

  • As the order of a difference polynomial is unchanged by application of σ\sigma, it follows that if (s(n))n(s(n))_{n} is difference algebraic with defining difference polynomial p𝒟σ(𝕂,x)p\in\mathcal{D}_{\sigma}(\mathbb{K},x), then any shift of (s(n))n(s(n))_{n} is also D-algebraic and defined by pp. The distinction between (s(n))n(s(n))_{n} and (s(n+i))n,i(s(n+i))_{n},i\in\mathbb{N} is apparent in their initial terms.

3 Arithmetic

We adapt the construction from [TT25, Section 2.2] to the difference case. The effectiveness of the underlying elimination theory was established in [OPS20]. The main contribution of this section is the development of systematic algorithms that automate the often tedious arithmetic of solutions to algebraic difference equations, thereby enhancing their accessibility.

3.1 Algorithm

Let N{0}N\in\mathbb{N}\setminus\{0\}, and consider NN difference-algebraic sequences as generic zeros of NN given difference polynomials pi𝔻sip_{i}\in\mathbb{D}_{s_{i}} of order nin_{i}\in\mathbb{N}. Let ff(s1,,sN)f\coloneqq f(s_{1},\ldots,s_{N}), where f𝕂(X1,,XN)f\in\mathbb{K}(X_{1},\ldots,X_{N}). We stretch that the sequence nf(s1(n),,sN(n))n\mapsto f(s_{1}(n),\ldots,s_{N}(n)) is well defined for sufficiently large integers nn. Set Mj=1NniM\coloneqq\sum_{j=1}^{N}n_{i}. We define the indeterminates

wj+1(n)=s1(n+j), for   0j<n1wj+1(n)=s2(n+j), for n1j<n1+n2wj+1(n)=sN(n+j), for MnNj<M.\begin{split}&w_{j+1}(n)=s_{1}(n+j),\,\,\text{ for }\,\,0\leq j<n_{1}\\ &w_{j+1}(n)=s_{2}(n+j),\,\,\text{ for }\,\,n_{1}\leq j<n_{1}+n_{2}\\ &\vdots\\ &w_{j+1}(n)=s_{N}(n+j),\,\,\text{ for }\,\,M-n_{N}\leq j<M.\end{split} (5)

Observe that for j1,,M{n1,n1+n2,,M}j\in{1,\ldots,M}\setminus\{n_{1},n_{1}+n_{2},\ldots,M\}, σ(wj(n))=wj+1(n)\sigma(w_{j}(n))=w_{j+1}(n), and σ(wMi+1(n))\sigma(w_{M_{i+1}}(n)) satisfies

pi+1(wMi+1(n),,wMi+1(n),σ(wMi+1(n)))=0,p_{i+1}\left(w_{M_{i}+1}(n),\ldots,w_{M_{i+1}}(n),\sigma(w_{M_{i+1}}(n))\right)=0, (6)

where Mij=0iniM_{i}\coloneqq\sum_{j=0}^{i}n_{i}, for i=0,,N1i=0,\ldots,N-1 and n0=0.n_{0}=0. The index variable can now be regarded implicitly, i.e., we can write wjw_{j} for wj(n)w_{j}(n) since its shifts are well understood.

For i=0,N1i=0\ldots,N-1, we write the difference polynomial pi+1p_{i+1} as

cmi+1σ(wMi+1)mj+pi+1,1(wMi+1,,wMi+1,σ(wMi+1)),c_{m_{i+1}}\,{\sigma(w_{M_{i+1}})}^{m_{j}}+p_{i+1,1}\left(w_{M_{i}+1},\ldots,w_{M_{i+1}},\sigma(w_{M_{i+1}})\right), (7)

cmi+1L𝕂[wMi+1,,wMi+1]c_{m_{i+1}}\in L\coloneqq\mathbb{K}[w_{M_{i}+1},\ldots,w_{M_{i+1}}], pi+1,1L[σ(wMi+1)]p_{i+1,1}\in L[\sigma(w_{M_{i+1}})] such that degσ(wMi+1)(pi+1,1)<mi+1\deg_{\sigma(w_{M_{i+1}})}(p_{i+1,1})<m_{i+1}. The coefficient cmi+1c_{m_{i+1}} is often called the initial of pi+1p_{i+1}. We can now view the problem as resulting from the following radical-rational dynamical system

{σ(𝐰)μ=𝐀(𝐰)+𝐄𝐀(σ(𝐰))z=B(𝐰){σ(w1)μ1=A1(w1,,wM)+EA1(σ(w1))σ(wM)μM=AM(w1,,wM)+EAM(σ(wM))z=B(w1,,wM),(f)\begin{cases}\sigma(\mathbf{w})^{\mu}=\mathbf{A}(\mathbf{w})+\mathbf{E}_{\mathbf{A}}(\sigma(\mathbf{w}))\\ z=B(\mathbf{w})\end{cases}\coloneqq\begin{cases}&{\sigma(w_{1})}^{\mu_{1}}=A_{1}(w_{1},\ldots,w_{M})+E_{A_{1}}(\sigma(w_{1}))\\ &\vdots\\ &{\sigma(w_{M})}^{\mu_{M}}=A_{M}(w_{1},\ldots,w_{M})+E_{A_{M}}(\sigma(w_{M}))\\ &z=B(w_{1},\ldots,w_{M})\end{cases},\,\quad\,(\mathcal{M}_{f}) (8)

where

  • μi,i=1,,M\mu_{i},i=1,\ldots,M, is either 11 or one of the mi,i=1,,Nm_{i},i=1,\ldots,N;

  • AiA_{i} (with numerator aia_{i}) is either wi+1w_{i+1} or the part of pi,1/cmip_{i,1}/c_{m_{i}} that is free of σ(wi)\sigma(w_{i}) i=1,,Ni=1,\ldots,N;

  • EAi(σ(wi))E_{A_{i}}(\sigma(w_{i})) (with numerator eaie_{a_{i}}) is either 0 or the part of pi,1/cmip_{i,1}/c_{m_{i}} that contains σ(wi)\sigma(w_{i}) (in its numerator), i=1,,Ni=1,\ldots,N;

  • B(w1,,wM)=f(w1,wn1+1,,wi=1N1ni+1)B(w_{1},\ldots,w_{M})=f(w_{1},w_{n_{1}+1},\ldots,w_{\sum_{i=1}^{N-1}n_{i}+1}).

We refer to MM as the dimension of (f)(\mathcal{M}_{f}).

Remark 3.1.

When the NN given difference polynomials are l.h.s., i.e., mi=1,m_{i}=1, i=1,,Ni=1,\ldots,N, and EAi=0E_{A_{i}}=0, (f)(\mathcal{M}_{f}) is a classical rational dynamical system often considered in theoretical computer science [CDBMP23].

Let QQ be the least common multiple of all the denominators in the system. Without loss of generality, we assume that all AiA_{i} and EAiE_{A_{i}} are written with QQ as the denominator and consider that B=b/QB=b/Q. In the difference-algebra context, (f)(\mathcal{M}_{f}) may be regarded as a system of difference polynomials on the multivariate ring of difference polynomials 𝔻𝐰,z𝔻w1,,wM,z\mathbb{D}_{\mathbf{w},z}\coloneqq\mathbb{D}_{w_{1},\ldots,w_{M},z}. In this case, we consider the difference ideal

IfQσ(𝐰)μ𝐚(𝐰)𝐞𝐚(σ(𝐰)),Qzb(𝐰):H𝔻𝐰,z,I_{\mathcal{M}_{f}}\coloneqq\langle Q{\sigma(\mathbf{w})}^{\mu}-\mathbf{a}(\mathbf{w})-\mathbf{e}_{\mathbf{a}}(\sigma(\mathbf{w})),\,Q\,z-b(\mathbf{w})\rangle\colon H^{\infty}\subset\mathbb{D}_{\mathbf{w},z}, (9)

where H{Q,σ(Q),σ2(Q),}H\coloneqq\{Q,\sigma(Q),\sigma^{2}(Q),\ldots\}, and “:H\colon H^{\infty}” denotes the saturation with HH.

Algorithm 1 gives the steps of our approach for the arithmetic of D-algebraic sequences.

Algorithm 1 Arithmetic of difference-algebraic sequences
NN difference polynomials pi𝔻sip_{i}\in\mathbb{D}_{s_{i}} of order nin_{i} and a function f𝕂(X1,,Xn)f\in\mathbb{K}(X_{1},\ldots,X_{n}).
A difference polynomial of order at most Mn1++nNM\coloneqq n_{1}+\cdots+n_{N} that vanishes at f(f1,,fN)f(f_{1},\ldots,f_{N}) for appropriate values of nn, where each fif_{i} is a generic zero of pip_{i}.
  1. 1.

    Construct (f)(\mathcal{M}_{f}) from the input p1,,pNp_{1},\ldots,p_{N} as in (8).

  2. 2.

    Denote by \mathcal{E} the set

    \displaystyle\mathcal{E} \displaystyle\coloneqq {Qσ(𝐰)μ𝐚(𝐰)𝐞𝐚(𝐰),Qzb(𝐰)}\displaystyle\{Q\,{\sigma(\mathbf{w})}^{\mu}-\mathbf{a}(\mathbf{w})-\mathbf{e}_{\mathbf{a}}(\mathbf{w}^{\prime}),Q\,z-b(\mathbf{w})\}
    =\displaystyle= {Qσ(wi)μiai(w1,,wM)eai(σ(wi)),i=1,,M,Qzb(w1,,wM)},\displaystyle\big{\{}Q\,{\sigma(w_{i})}^{\mu_{i}}-a_{i}(w_{1},\ldots,w_{M})-e_{a_{i}}(\sigma(w_{i})),i=1,\ldots,M,\,Q\,z-b(w_{1},\ldots,w_{M})\big{\}},
Algorithm 2 Arithmetic of difference-algebraic sequences
𝕂[w1,,wM,σ(w1),,σ(wM),z].\mathcal{E}\subset\mathbb{K}[w_{1},\ldots,w_{M},\sigma(w_{1}),\ldots,\sigma(w_{M}),z].
  1. 3.

    Compute the first M1M-1 shifts (application of σ\sigma) of all polynomials in \mathcal{E} and add them to \mathcal{E}.

  2. 4.

    Compute the MMth shift of Qzb(w1,,wM)Q\,z-b(w_{1},\ldots,w_{M}) and add it to \mathcal{E}. We are now in the ring 𝕂[σM(w1),,σM(wM),σM(z)]\mathbb{K}[\sigma^{\leq M}(w_{1}),\ldots,\sigma^{\leq M}(w_{M}),\sigma^{\leq M}(z)], which contains all differential polynomials of order at most MM in 𝔻𝐰,z\mathbb{D}_{\mathbf{w},z}.

  3. 5.

    Let I𝕂[σM(w1),,σM(wM),σM(z)]I\coloneqq\langle\mathcal{E}\rangle\subset\mathbb{K}[\sigma^{\leq M}(w_{1}),\ldots,\sigma^{\leq M}(w_{M}),\sigma^{\leq M}(z)] be the ideal generated by the elements of \mathcal{E}.

  4. 6.

    Let H{Q,σ(Q),,σM(Q)}H\coloneqq\{Q,\sigma(Q),\ldots,\sigma^{M}(Q)\}.

  5. 7.

    Update II by its saturation with HH, i.e, II:HI\coloneqq I\colon H^{\infty}.

  6. 8.

    Compute the elimination ideal I𝕂[σM(z)]I\cap\mathbb{K}[\sigma^{\leq M}(z)]. From the resulting Gröbner basis, choose a polynomial qq of the lowest degree among those of the lowest order.

  7. 9.

    Return qq.

To prove the correctness of Algorithm 1, we must show that σM(If)𝕂[σ(z)]\langle\sigma^{\leq M}\left(I_{\mathcal{M}_{f}}\right)\rangle\cap\mathbb{K}[\sigma^{\infty}(z)] in step 8 is a non-trivial elimination ideal. The following theorem establishes this fact.

Theorem 3.2.

On the commutative ring 𝕂[σ(𝐰),σ(z)]\mathbb{K}[\sigma^{\infty}(\mathbf{w}),\sigma^{\infty}(z)], seen as a polynomial ring in infinitely many variables, consider the lexicographic monomial ordering corresponding to any ordering on the variables such that

  • (i.)

    σj1(z)σj2(wi)\sigma^{j_{1}}(z)\succ\sigma^{j_{2}}(w_{i}), i,j1,j2i,j_{1},j_{2}\in\mathbb{N},

  • (ii.)

    σj+1(z)σj(z)\sigma^{j+1}(z)\succ\sigma^{j}(z), σj+1(wi1)σj(wi2)\sigma^{j+1}(w_{i_{1}})\succ\sigma^{j}(w_{i_{2}}), i1,i2,ji_{1},i_{2},j\in\mathbb{N}.

Then the set {Qσ(𝐰)μ𝐚(𝐰)𝐞𝐚(σ(𝐰)),Qzb(𝐲)}\mathcal{E}\coloneqq\left\{Q{\sigma(\mathbf{w})}^{\mu}-\mathbf{a}(\mathbf{w})-\mathbf{e}_{\mathbf{a}}(\sigma(\mathbf{w})),\,Qz-b(\mathbf{y})\right\} is a triangular set with respect to this ordering. Moreover,

σM(If)𝕂[σ(z)]0.\langle\sigma^{\leq M}\left(I_{\mathcal{M}_{f}}\right)\rangle\cap\mathbb{K}[\sigma^{\infty}(z)]\neq\langle 0\rangle. (10)
Proof.

First, let us mention that the system (f)(\mathcal{M}_{f}) is consistent by Theorem 3.2 from the individual input difference polynomials. The leading monomials of

σj(Qσ(wi)μiai(𝐰)eai(σ(wi))) and σj(Qzb(𝐰))\displaystyle\sigma^{j}\left(Q\,\sigma(w_{i})^{\mu_{i}}-a_{i}(\mathbf{w})-e_{a_{i}}(\sigma(w_{i}))\right)\,\text{ and }\,\sigma^{j}\left(Q\,z-b(\mathbf{w})\right)

in the ring 𝕂[σ(𝐰),σ(z)]\mathbb{K}[\sigma^{\infty}(\mathbf{w}),\sigma^{\infty}(z)] have highest variables σj+1(wi)\sigma^{j+1}(w_{i}) and σj(z)\sigma^{j}(z), respectively. Since these variables are all distinct, by definition (see [Hub03, Definition 4.1]), we deduce that \mathcal{E} is a consistent triangular set with coefficients in the field 𝕂\mathbb{K}. As a triangular set, \mathcal{E} defines the ideal :H=If\langle\mathcal{E}\rangle:H^{\infty}=I_{\mathcal{M}_{f}}, where H{Q,σ(Q),,σM(Q)}H~{}\coloneqq~{}\{Q,\sigma(Q),\ldots,\sigma^{M}(Q)\}. Therefore by [Hub03, Theorem 4.4]), all associated primes of σM(If)\sigma^{\leq M}(I_{\mathcal{M}_{f}}) share the same transcendence basis given by the non-leading variables {w1,,wM}\{w_{1},\ldots,w_{M}\} in σM(If)\sigma^{\leq M}(I_{\mathcal{M}_{f}}). Thus the transcendence degree of 𝕂[σM(𝐰),σM(z)]/σM(If)\mathbb{K}[\sigma^{\leq M}(\mathbf{w}),\sigma^{\leq M}(z)]/\langle\sigma^{\leq M}\left(I_{\mathcal{M}_{f}}\right)\rangle over 𝕂\mathbb{K} is MM. However, the transcendence degree of 𝕂(x)[σM(z)]\mathbb{K}(x)[\sigma^{\leq M}(z)] is M+1M+1. Hence we must have σM(If)𝕂[σ(z)]0\langle\sigma^{\leq M}\left(I_{\mathcal{M}_{f}}\right)\rangle\cap\mathbb{K}[\sigma^{\infty}(z)]\neq\langle 0\rangle. ∎

Observe that MM is the minimal integer for which the argument of the proof of Theorem 3.2 holds.

3.2 Some closure properties and examples

Let us present some immediate consequences of the result from the previous subsection, including the ring structure of 𝕂0\mathbb{K}^{\aleph_{0}}, induced by addition and multiplication.

Corollary 3.3.

Let (u(n))n(u(n))_{n} and (v(n))n(v(n))_{n} be two difference-algebraic sequences of order r1r_{1} and r2r_{2}, respectively. Then, the following sequences are difference-algebraic of order rr:

  1. 1.

    addition: (u(n)+v(n))n(u(n)+v(n))_{n}, with rr1+r2r\leq r_{1}+r_{2};

  2. 2.

    multiplication: (u(n)v(n))n(u(n)\,v(n))_{n}, with rr1+r2r\leq r_{1}+r_{2};

  3. 3.

    division: (1/v(n))nn0(1/v(n))_{n\geq n_{0}}, with rr2r\leq r_{2}, provided that (v(n))n(v(n))_{n} is non-zero and v(n)0v(n)\neq 0 for all nn0n\geq n_{0}\in\mathbb{N};

  4. 4.

    taking radicals: (u(n)N)n,N(\sqrt[N]{u(n)}\,)_{n},N\in\mathbb{N}, with rr1r\leq r_{1}, provided that u(n)0u(n)\geq 0 for all nn0n\geq n_{0}\in\mathbb{N};

  5. 5.

    partial product: (k=k0nu(k))n,k0(\prod_{k=k_{0}}^{n}u(k))_{n},k_{0}\in\mathbb{N}, with rr1+1r\leq r_{1}+1.

  6. 6.

    partial sum: (k=k0nu(k))n,k0(\sum_{k=k_{0}}^{n}u(k))_{n},\,k_{0}\in\mathbb{N}, with rr1+1r\leq r_{1}+1;

Proof.

The proofs of these properties are deduced from constructions of radical-rational dynamical systems (f)(\mathcal{M}_{f}) as in (8) for some rational functions, here denoted ff.

  1. 1.

    f(X,Y)X+Yf(X,Y)\coloneqq X+Y;

  2. 2.

    f(X,Y)XYf(X,Y)\coloneqq X\,Y;

  3. 3.

    f(X)1/Xf(X)\coloneqq 1/X and (f)(\mathcal{M}_{f}) built with the defining difference polynomial of (v(n))n(v(n))_{n} only;

  4. 4.

    This follows from the fact that the correctness of Algorithm 1 is unchanged with having zz replaced by zNz^{N}, NN\in\mathbb{N}. Thus, (f)(\mathcal{M}_{f}) is built with f(X)=Xf(X)=X such that the output equation writes zN=w1z^{N}=w_{1}. Note, however, that this is an elementary fact. Indeed, one verifies that the difference polynomial obtained by substituting (σj(x))i(\sigma^{j}(x))^{i} by (σj(x))iN(\sigma^{j}(x))^{i\,N} in pp has (u(n)N)n(\sqrt[N]{u(n)}\,)_{n} as a zero.

  5. 5.

    Let us denote by (t(n))n(t(n))_{n}, the partial product of (u(n))n(u(n))_{n}. It is defined by the recursion t(n+1)=t(n)u(n)t(n+1)=t(n)\,u(n), with t(0)=1t(0)=1. First, consider the radical-rational dynamical system (f)(\mathcal{M}_{f}) constructed from the difference polynomial of (u(n))n(u(n))_{n}, with ff unspecified. At this stage, we know that for any ff, we have r1r_{1} components in the system. To take (t(n))n(t(n))_{n} into account, we add a new variable wr1+1w_{r_{1}+1}, such that σ(wr1+1)=wr1+1w1\sigma(w_{r_{1}+1})=w_{r_{1}+1}\,w_{1}, which represents the recursion. Then, we choose the function bb of the system as b=wr1+1b=w_{r_{1}+1}, which tells Algorithm 1 that we want a difference polynomial for (t(n))n(t(n))_{n}. Hence, by construction, (t(n))n(t(n))_{n} is D-algebraic of order at most r1+1r_{1}+1 as claimed. Some constraints of the resulting difference polynomial may define the value of n0n_{0}.

  6. 6.

    For the partial sum (also known as the partial sum), say (s(n))n(s(n))_{n}, one considers the recursion s(n+1)=s(n)+u(n)s(n+1)=s(n)+u(n), with s(0)=0s(0)=0, and proceeds in the same way as with the partial product. One can verify that the difference polynomial obtained by substituting xx by σ(x)x\sigma(x)-x in the defining difference polynomial of (u(n))n(u(n))_{n} belongs to the difference ideal of the output of the algorithm. The obtained difference polynomial may need to be shifted to get its normal form.

Applications of Algorithm 1 reveal that a dynamical system in the form of (f)(\mathcal{M}_{f}) from (8) serves as a certificate for computing an algebraic difference equation (or difference polynomial) associated with a given problem.

Example 3.4.

Let p,q𝒟σ(𝕂,x)p,q\in\mathcal{D}_{\sigma}(\mathbb{K},x), such that p=σ2(x)σ(x)xp=\sigma^{2}(x)-\sigma(x)\,x, q=σ(x)x2xq=\sigma(x)-x^{2}-x, specialized with the generic solution u(n)u(n) and v(n)v(n), respectively. With the initial values u(0)=1u(0)=1, u(1)=k𝕂u(1)=k\in\mathbb{K}, the algebraic difference equation associated to pp yields the sequence of general term kFnk^{F_{n}}, where FnF_{n} is the nnth Fibonacci number (see, for instance, A000301 from [S+03]). With v(0)=1,v(1)=2v(0)=1,v(1)=2, v(n) is known to denote the number of ordered trees having nodes of outdegree 0,1,20,1,2 and such that all leaves are at level nn (see A007018). Let us find algebraic difference equations satisfied by (u(n)/v(n))n(u(n)/v(n))_{n}, (u(n)v(n))n(u(n)\,v(n))_{n}, and (k=0nu(k))n(\sum_{k=0}^{n}u(k))_{n}. In all these cases, we will write the resulting equation with the undetermined term s(n)s(n).

  1. 1.

    (u(n)/v(n))n(u(n)/v(n))_{n}.

    We use the same notations from the previous subsection. The corresponding dynamical system is given by

    {σ(w1)=w2σ(w2)=w1w2σ(w3)=w32+w3z=w1w3.\begin{cases}\sigma(w_{1})=w_{2}\\ \sigma(w_{2})=w_{1}\,w_{2}\\ \sigma(w_{3})=w_{3}^{2}+w_{3}\\ z=\frac{w_{1}}{w_{3}}\end{cases}. (11)

    After elimination, we obtain the following principal ideal

    σ(z)4σ3(z)2z4z3σ(z)4σ2(z)2σ3(z)z3σ(z)3σ2(z)σ3(z)2z2σ(z)3σ2(z)3σ3(z)+zσ(z)3σ2(z)5z2σ(z)2σ2(z)2σ3(z)2+2zσ(z)2σ2(z)4σ3(z)+σ(z)2σ2(z)6+zσ(z)σ2(z)3σ3(z)2+2σ(z)σ2(z)5σ3(z)+σ2(z)4σ3(z)2,\begin{split}&\Big{\langle}\sigma(z)^{4}\sigma^{3}(z)^{2}z^{4}-z^{3}\sigma(z)^{4}\sigma^{2}(z)^{2}\sigma^{3}(z)-z^{3}\sigma(z)^{3}\sigma^{2}(z)\sigma^{3}(z)^{2}-z^{2}\sigma(z)^{3}\sigma^{2}(z)^{3}\sigma^{3}(z)\\ &+z\sigma(z)^{3}\sigma^{2}(z)^{5}-z^{2}\sigma(z)^{2}\sigma^{2}(z)^{2}\sigma^{3}(z)^{2}+2z\sigma(z)^{2}\sigma^{2}(z)^{4}\sigma^{3}(z)+\sigma(z)^{2}\sigma^{2}(z)^{6}\\ &+z\sigma(z)\sigma^{2}(z)^{3}\sigma^{3}(z)^{2}+2\sigma(z)\sigma^{2}(z)^{5}\sigma^{3}(z)+\sigma^{2}(z)^{4}\sigma^{3}(z)^{2}\Big{\rangle},\end{split} (12)

    where σj(z)i\sigma^{j}(z)^{i} is understood as (σj(z))i(\sigma^{j}(z))^{i}. Hence the algebraic difference equation

    s(n+1)4s(n+3)2s(n)4s(n+1)4s(n+3)s(n)3s(n+2)2+s(n+3)2s(n+2)4s(n+1)3s(n+3)2s(n)3s(n+2)+s(n+1)3s(n)s(n+2)5+s(n+1)2s(n+2)6+2s(n+1)2s(n+3)s(n)s(n+2)4s(n+1)2s(n+3)2s(n)2s(n+2)2+s(n+1)s(n+3)2s(n)s(n+2)3+2s(n+1)s(n+3)s(n+2)5s(n+1)3s(n+3)s(n)2s(n+2)3=0,\begin{split}&s(n+1)^{4}s(n+3)^{2}s(n)^{4}-s(n+1)^{4}s(n+3)s(n)^{3}s(n+2)^{2}+s(n+3)^{2}s(n+2)^{4}\\ &-s(n+1)^{3}s(n+3)^{2}s(n)^{3}s(n+2)+s(n+1)^{3}s(n)s(n+2)^{5}+s(n+1)^{2}s(n+2)^{6}\\ &+2s(n+1)^{2}s(n+3)s(n)s(n+2)^{4}-s(n+1)^{2}s(n+3)^{2}s(n)^{2}s(n+2)^{2}\\ &+s(n+1)s(n+3)^{2}s(n)s(n+2)^{3}+2s(n+1)s(n+3)s(n+2)^{5}\\ &-s(n+1)^{3}s(n+3)s(n)^{2}s(n+2)^{3}=0,\\ \end{split} (13)

    of order 33 and degree 1010.

  2. 2.

    (u(n)v(n))n(u(n)\,v(n))_{n}.

    The system is similar to (11) with the last equation replaced by z=w1w3z=w_{1}\,w_{3}. We obtain a principal ideal with the following associated equation:

    s(n+2)2s(n+1)4s(n)4+2s(n+3)s(n+2)s(n+1)3s(n)4+s(n+2)3s(n+1)3s(n)3+s(n+3)2s(n+1)2s(n)4+2s(n+3)s(n+2)2s(n+1)2s(n)3s(n+2)4s(n+1)2s(n)2+s(n+3)2s(n+2)s(n+1)s(n)3s(n+3)s(n+2)3s(n+1)s(n)2s(n+2)5s(n+1)s(n)s(n+3)s(n+2)4s(n)+s(n+2)6=0.\begin{split}&s(n+2)^{2}s(n+1)^{4}s(n)^{4}+2s(n+3)s(n+2)s(n+1)^{3}s(n)^{4}+s(n+2)^{3}s(n+1)^{3}s(n)^{3}\\ &+s(n+3)^{2}s(n+1)^{2}s(n)^{4}+2s(n+3)s(n+2)^{2}s(n+1)^{2}s(n)^{3}-s(n+2)^{4}s(n+1)^{2}s(n)^{2}\\ &+s(n+3)^{2}s(n+2)s(n+1)s(n)^{3}-s(n+3)s(n+2)^{3}s(n+1)s(n)^{2}-s(n+2)^{5}s(n+1)s(n)\\ &-s(n+3)s(n+2)^{4}s(n)+s(n+2)^{6}=0.\end{split} (14)

    Observe that (14) is also satisfied by the sequence (v(n)/u(n))n(v(n)/u(n))_{n} since (1/u(n))n(1/u(n))_{n} is also a zero of pp.

  3. 3.

    (k=0nu(k))n(\sum_{k=0}^{n}u(k))_{n}.

    The corresponding system writes

    {σ(w1)=w2σ(w2)=w1w2σ(w3)=w3+w1z=w3.\begin{cases}\sigma(w_{1})=w_{2}\\ \sigma(w_{2})=w_{1}\,w_{2}\\ \sigma(w_{3})=w_{3}+w_{1}\\ z=w_{3}\end{cases}. (15)

    Here again, we obtain a principal ideal. The associated equation is given by

    s(n)s(n+1)s(n)s(n+2)s(n+1)2+s(n+1)s(n+2)+s(n+2)s(n+3)=0.s(n)s(n+1)-s(n)s(n+2)-s(n+1)^{2}+s(n+1)s(n+2)+s(n+2)-s(n+3)=0. (16)

The fact that we obtain principal ideals in all three examples is a common situation encountered in the differential case. It is explained in [DGHP23, Remark 4] that such an ideal is generally “almost principal”. \blacksquare

4 L.h.s. D-algebraic sequences

In this section, we focus on two important subclasses of D-algebraic sequences. We show that sequences from both classes are zeros of difference polynomials that are linear in their highest shift terms.

4.1 Holonomic sequences

Holonomic sequences are solutions to linear recurrence equations with polynomial coefficients in the index variable. These sequences are ubiquitous in the sciences. One reason may be that they share similar properties with their generating functions. Some interesting applications can be found in [BCR24, KP11].

In [TTW24], Worrell and the author proposed an algorithm to convert any holonomic equation into an l.h.s. algebraic difference equation. We revisit this result and complete its proof.

For this part, we replace the field 𝕂\mathbb{K} with 𝕂(n)\mathbb{K}(n) and work on the specialized ring of difference polynomials 𝔻s(n)𝕂(n)[σ(s(n))]\mathbb{D}_{s}(n)\coloneqq\mathbb{K}(n)[\sigma^{\infty}(s(n))]. This enables us to introduce the index variable nn in our difference polynomials. However, the aim is to derive a difference polynomial p𝔻s=𝕂[σ(s(n))]p\in\mathbb{D}_{s}=\mathbb{K}[\sigma^{\infty}(s(n))] where the term s(n+ord(p))s(n+\operatorname{ord}(p)) appears linearly.

Definition 4.1.

The holonomic degree of a difference polynomial p𝔻s(n)p\in\mathbb{D}_{s}(n) of degree 11 is the degree of pp viewed as a univariate polynomial in nn.

When working with holonomic equations or sequences, we often use the word “degree” to refer to the holonomic degree.

Theorem 4.2.

Every holonomic sequence of order ll and degree dd is a zero of an l.h.s. difference polynomial of order at most l+dl+d.

Proof.

Let p𝔻s(n)p\in\mathbb{D}_{s}(n) be holonomic of degree dd and order ll. If d=0d=0, then we are done. For the rest of the proof, we assume that d>0d>0. This assumption implies that (s(n))n(s(n))_{n} (as a sequence) does not vanish any holonomic difference polynomial of order l\leq l and degree d\leq d. In particular, no constant coefficient linear recurrence of order l\leq l is satisfied by (s(n))n(s(n))_{n}.

We look at pp and its shifts as polynomials in nn such that

σj(p)=k=0dγj,knk,j=0,,d,\sigma^{j}(p)=\sum_{k=0}^{d}\gamma_{j,k}\,n^{k},\,\,j=0,\ldots,d, (17)

where γj,k𝕂[s(n+j),,s(n+j+l)]\gamma_{j,k}\in\mathbb{K}[s(n+j),\ldots,s(n+j+l)]. We consider the associated equations for j<dj<d and write them as follows

k=1dγj,knk=γj,0,j=0,,d1.\sum_{k=1}^{d}\gamma_{j,k}\,n^{k}=-\gamma_{j,0},\,\,j=0,\ldots,d-1. (18)

This is a linear system of dd equations in (n,n2,,nd)T(n,n^{2},\ldots,n^{d})^{T}. We claim that the matrix of the system has full rank due to the shifts involved in the γj,k\gamma_{j,k}’s. Indeed, each γj,k\gamma_{j,k} has the following form:

γj,ki=0lcj,i,ks(n+j+i)=Cj,kSl+j,\gamma_{j,k}\coloneqq\sum_{i=0}^{l}c_{j,i,k}\,s(n+j+i)=C_{j,k}\cdot S_{l+j}, (19)

where cj,i,kc_{j,i,k} is the constant coefficient of nkn^{k} in the polynomial coefficient of s(n+j+i)s(n+j+i) in σj(p)\sigma^{j}(p), i=0,,li=0,\ldots,l, j=0,,d1j=0,\ldots,d-1; Sl+j=(s(n+j),,s(n+j+l))TS_{l+j}=(s(n+j),\ldots,s(n+j+l))^{T} and Cj,k=(cj,0,k,cj,1,k,,cj,l,k)C_{j,k}=(c_{j,0,k},c_{j,1,k},\ldots,c_{j,l,k}). Note that all cj,i,kc_{j,i,k}’s are linear combinations of the c0,i,kc_{0,i,k}’s, and cj,i,d=c0,i,dc_{j,i,d}=c_{0,i,d} for all j=0,,d1j=0,\ldots,d-1.

Let Γ0,,Γd1\Gamma_{0},\ldots,\Gamma_{d-1} be the rows of the matrix from (18). Observe that

Γj=(γj,1,,γj,d)=(Cj,1Sl+j,,Cj,dSl+j).\Gamma_{j}=(\gamma_{j,1},\ldots,\gamma_{j,d})=(C_{j,1}\cdot S_{l+j},\ldots,C_{j,d}\cdot S_{l+j}). (20)

The components of the Γj\Gamma_{j}’s are all nonzero as they all yield llth-order linear recurrence equations with constant coefficients.

Let λ0,λ1,,λd1𝕂(s(n),,s(n+l+d1))\lambda_{0},\lambda_{1},\ldots,\lambda_{d-1}\in\mathbb{K}(s(n),\ldots,s(n+l+d-1)) such that j=0d1λjΓj=0\sum_{j=0}^{d-1}\lambda_{j}\,\Gamma_{j}=0. The latter is a homogeneous linear system of linearly independent equations in the λ\lambda’s and can only have the trivial solution. To see that, fix kk and kk^{\prime}, 1kkd1\leq k\neq k^{\prime}\leq d. Notice that for 0j1j2d10\leq j_{1}\neq j_{2}\leq d-1, γj1,k\gamma_{j_{1},k} and γj2,k\gamma_{j_{2},k} can be seen as two independent variables because Sl+j1S_{l+j_{1}} and Sl+j2S_{l+j_{2}} are two linearly independent vectors over 𝕂(s(n),,s(n+l+d1))\mathbb{K}(s(n),\ldots,s(n+l+d-1)). Thus, while it might be possible to find λ0,λ1,,λd1𝕂(s(n),,s(n+l+d1))\lambda_{0},\lambda_{1},\ldots,\lambda_{d-1}\in\mathbb{K}(s(n),\ldots,s(n+l+d-1)) so that

λ0γ0,k+λ1γ1,k++λd1γd1,k=0,\lambda_{0}\,\gamma_{0,k}+\lambda_{1}\,\gamma_{1,k}+\cdots+\lambda_{d-1}\,\gamma_{d-1,k}=0, (21)

it is impossible for the same λ\lambda’s to verify

λ0γ0,k+λ1γ1,k++λd1γd1,k=0,\lambda_{0}\,\gamma_{0,k^{\prime}}+\lambda_{1}\,\gamma_{1,k^{\prime}}+\cdots+\lambda_{d-1}\,\gamma_{d-1,k^{\prime}}=0, (22)

unless λ0=λ1==λd1=0\lambda_{0}=\lambda_{1}=\cdots=\lambda_{d-1}=0.

Hence (18) is non-singular and for all positive integers kdk\leq d, nk𝕂(s(n),,s(n+d+l1))n^{k}\in\mathbb{K}(s(n),\ldots,s(n+d+l-1)). Finally, we plug these rational expressions into σd(p)\sigma^{d}(p). Since all the nkn^{k}’s are free of s(n+l+d)s(n+l+d), the resulting difference polynomial is l.h.s. of order at most l+dl+d. ∎

Our implementation of the algorithm from the proof of Theorem 4.2 is now part of the DalgSeq subpackage of NLDE. The corresponding procedure is HoloToSimpleRatrec.

Example 4.3 (Generating Somos-like sequences [Mal92, EZ14]).

A Somos-like sequence is an integral sequence defined with a rational recursion. Using Theorem 4.2, one can generate a Somos-like sequence as follows:

  1. 1.

    Take a holonomic equation and choose integral initial values such that all the following terms are also integers. A natural choice is to take an equation of the form

    s(n+k+1)=P0(n)s(n)++Pk(n)s(n+k),s(n+k+1)=P_{0}(n)s(n)+\cdots+P_{k}(n)s(n+k), (23)

    Pi(n)𝕂[n],i=0,,kP_{i}(n)\in\mathbb{K}[n],i=0,\ldots,k, with any set of k+1k+1 integers for the initial values.

  2. 2.

    Then use the algorithm from the proof of Theorem 4.2 to convert (23) into an l.h.s. difference polynomial.

Concretely, let us take

s(n+3)=ns(n)+(n+1)s(n+1)+(n+2)s(n+2).s(n+3)=ns(n)+(n+1)s(n+1)+(n+2)s(n+2). (24)

We choose the initial values s(0)=s(1)=s(2)=1s(0)=s(1)=s(2)=1. This is A122752 from [S+03]. We have s(3)=3s(3)=3. Thus, the sequence defined by (24) and these initial values is an integer sequence. Our procedure HoloToSimpleRatrec produces the following rational recursion from (24):

s(n+4)=1s(n)+s(n+1)+s(n+2)(s(n)s(n+1)+2s(n)s(n+2)+3s(n)s(n+3)+3s(n+1)s(n+3)+2s(n+2)s(n+3)+s(n+3)2).s(n+4)=\frac{1}{{s(n)+s(n+1)+s(n+2)}}\Big{(}s(n)s(n+1)+2s(n)s(n+2)+3s(n)s(n+3)\\ +3s(n+1)s(n+3)+2s(n+2)s(n+3)+s(n+3)^{2}\Big{)}. (25)

Using (25), we generate the next 77 terms of (s(n))n(s(n))_{n} below:

12,59,352,2455,19592,176033,1758218.12,59,352,2455,19592,176033,1758218.

\blacksquare

Example 4.4.

Catalan numbers are defined by the formula C(n)1n+1(2nn)C(n)\coloneqq\frac{1}{n+1}\binom{2n}{n}, and satisfy the equation (n+2)s(n+1)(4n+2)s(n)=0(n+2)s(n+1)-(4n+2)s(n)=0, which is holonomic. Using HoloToSimpleRatrec, we convert that equation into the rational recursion

s(n+2)=2s(n+1)(8s(n)+s(n+1))10s(n)s(n+1).s(n+2)=\frac{2s(n+1)\left(8s(n)+s(n+1)\right)}{10s(n)-s(n+1)}. (26)

The above recursion appeared on the OEIS website for A000108 in 2006.

A noteworthy observation emerges from the geometrical view of Theorem 4.2. For the present example, with 𝕂=\mathbb{K}=\mathbb{R}, let us consider the surface defined by

HC{(x,y,z),3:z(x+2)y(4x+2)=0}.H_{C}\coloneqq\left\{(x,y,z),\,\mathbb{R}^{3}\,\colon z\,(x+2)-y\,(4x+2)=0\right\}. (27)

This encodes the holonomic equation of Catalan numbers. On this surface, Catalan numbers are the points Pn(n,C(n),C(n+1)),nP_{n}\coloneqq(n,C(n),C(n+1)),n\in\mathbb{N}. For the D-algebraic representation, we consider

HC{(x,y,z),3:z(10xy)(8x+y)=0},H_{C}^{\prime}\coloneqq\left\{(x,y,z),\,\mathbb{R}^{3}\,\colon z\,(10x-y)-(8x+y)=0\right\}, (28)

where Catalan numbers are the points Pn(C(n),C(n+1),C(n+2)),nP_{n}^{\prime}\coloneqq(C(n),C(n+1),C(n+2)),n\in\mathbb{N}. It turns out that HCH_{C} and HCH_{C}^{\prime} intersect on a curve surrounded by the points PnP_{n} and PnP_{n}^{\prime}, with P1=P0P_{1}=P_{0}^{\prime} on it. The projection of the algebraic variety thus defined onto the xyxy-plane is given by the curve

𝒞C{(x,y),2:y(x+1)2x(2x1)=0}.\mathcal{C}_{C}\coloneqq\left\{(x,y),\,\mathbb{R}^{2}\,\colon y\,(x+1)-2x(2x-1)=0\right\}. (29)

Figure 1 illustrates this geometry from the first quadrant of the xyxy-plane.

Refer to caption
Figure 1: A geometric view of Theorem 4.2 for Catalan numbers.
HCH_{C} is in red, HCH_{C}^{\prime} in blue, and 𝒞C\mathcal{C}_{C} is in magenta.

Further study is needed to elucidate the connection between such varieties and their related holonomic sequences. \blacksquare

4.2 C2C^{2}-Finite sequences

A CC-finite sequence solves a linear recurrence equation with constant coefficients. A C2C^{2}-finite sequence is a solution to a linear recurrence equation with CC-finite term coefficients [JPNP23]. As in the differential case with D2D^{2}-finite functions, C2C^{2}-finite sequences are D-algebraic. An implementation for computing algebraic difference equations from C2C^{2}-finite sequences is provided in our package under the name CCfiniteToDalg. The approach is similar to that of D2D^{2}-finite functions as described in [TT23]. In this subsection, we rely on a result from [CDBMP23] to establish the following theorem.

Theorem 4.5.

If (s(n))n(s(n))_{n} is C2C^{2}-finite such that the leading CC-finite term coefficient of its defining equation is non-zero for all nNn\geq N\in\mathbb{N}. Then (s(n))nN(s(n))_{n\geq N} satisfies an l.h.s. algebraic difference equation.

Proof.

It suffices to construct a dynamical system in the form of (8) where μ=(1,,1)T\mu=(1,\ldots,1)^{T} and 𝐄𝐀(σ(𝐰))=𝟎\mathbf{E}_{\mathbf{A}}(\sigma(\mathbf{w}))=\boldsymbol{0}. This is straightforward from the formal definition of a C2C^{2}-finite sequence. Let (s(n))n(s(n))_{n} be C2C^{2}-finite of order ll with CC-finite coefficients cl(n),,c0(n)c_{l}(n),\ldots,c_{0}(n), of order rl,,r0r_{l},\ldots,r_{0}, respectively. For simplicity, we assume N=0N=0. From the defining equation of the coefficient cj(n)c_{j}(n), we can write

cj(n+ri)=α0,jci(n)++αrj1,jcj(n+l1),c_{j}(n+r_{i})=\alpha_{0,j}\,c_{i}(n)+\cdots+\alpha_{r_{j}-1,j}\,c_{j}(n+l-1), (30)

where αi,j𝕂\alpha_{i,j}\in\mathbb{K}, i=0,,rj1,j=0,,li=0,\ldots,r_{j}-1,j=0,\ldots,l. Similarly, from the equation of s(n)s(n), we have

s(n+l)=1cl(n)(c0(n)s(n)++cl1(n)s(n+l1)).s(n+l)=-\frac{1}{c_{l}(n)}\left(c_{0}(n)\,s(n)+\cdots+c_{l-1}(n)\,s(n+l-1)\right). (31)

Thus, following the construction from Section 3.1, we deduce that each cj(n)c_{j}(n) adds rjr_{j} equations to the system, which leads to a rational dynamical system of dimension l+j=0lrjl+\sum_{j=0}^{l}r_{j}. ∎

In Theorem 4.5, NN is known to exist for non-degenerate CC-finite sequences [BM76]. In the general case, however, the proper definition of a C2C^{2}-finite sequence is subject to answering the Skolem problem [OW12] for the leading CC-finite term coefficient. Note that this constraint highly depends on the choice of initial values: the sequence ((1)n1)n((-1)^{n}-1)_{n} satisfies the recurrence s(n+2)s(n)=0s(n+2)-s(n)=0 and has infinitely many zeros; however, the sequence (2(1)n1)n(2\,(-1)^{n}-1)_{n} satisfies the same recurrence equation but has no zero. In the following example, we use our algorithm to compute an algebraic difference equation satisfied by a C2C^{2}-finite sequence for which two not-necessarily-equal solutions of s(n+2)=s(n)s(n+2)=s(n) appear within the coefficients of its equation.

Example 4.6.

Consider a C2C^{2}-finite sequence (s(n))n(s(n))_{n} solution of

u(n)s(n)+2s(n+1)+v(n)s(n+2)=0,u(n)\,s(n)+2\,s(n+1)+v(n)\,s(n+2)=0, (32)

where (u(n))n(u(n))_{n} and (v(n))n(v(n))_{n} are two not-necessarily identical solutions of s(n+2)s(n)=0s(n+2)-s(n)=0. This includes the result of [JPNP23, Example 4.1]. The corresponding dynamical system writes:

{σ(w1)=w2σ(w2)=w5w1+2w2w3σ(w3)=w4σ(w4)=w3σ(w5)=w6σ(w6)=w5z=w1.\begin{cases}\sigma(w_{1})=w_{2}\\ \sigma(w_{2})=-\frac{w_{5}\,w_{1}+2\,w_{2}}{w_{3}}\\ \sigma(w_{3})=w_{4}\\ \sigma(w_{4})=w_{3}\\ \sigma(w_{5})=w_{6}\\ \sigma(w_{6})=w_{5}\\ z=w_{1}\end{cases}. (33)

The resulting 66th-order algebraic difference equation is l.h.s. and may be written recursively as follows:

s(n+6)=s(n+5)s(n+4)s(n)+s(n+4)s(n+3)s(n+2)s(n+4)2s(n+1)s(n+5)s(n+2)2s(n+3)s(n)s(n+2)s(n+1).s(n+6)=\frac{s(n+5)s(n+4)s(n)+s(n+4)s(n+3)s(n+2)-s(n+4)^{2}s(n+1)-s(n+5)s(n+2)^{2}}{s(n+3)s(n)-s(n+2)s(n+1)}. (34)

\blacksquare

Although we obtained an l.h.s. algebraic difference equation in (34), the underlying adaptation of Algorithm 1 does not guarantee such an output. A bound for the order of the desired l.h.s. equation is provided in [CDBMP23] but without an algorithm.

5 Subsequences

Recall that a subsequence of a sequence (s(n))n(s(n))_{n} is a sequence (t(n))n(t(n))_{n} such that t(n)=s(φ(n))t(n)=s(\varphi(n)), where φ\varphi is a strictly increasing embedding of \mathbb{N}. Thus, to find a difference polynomial pp that vanishes at (t(n))n(t(n))_{n}, we need an endomorphism σ~\tilde{\sigma} that sends s(φ(n))s(\varphi(n)) to s(φ(n+1))s(\varphi(n+1)), i.e., the minimal gap between the orders of two difference monomials in pp is δσ~=minn{φ(n+1)φ(n)}\delta_{\tilde{\sigma}}=\min_{n\in\mathbb{N}}\{\varphi(n+1)-\varphi(n)\} and not the usual n+1n=1n+1-n=1. This section focuses on the case where φ(n)=dn\varphi(n)=dn. This is the nnth term formula of an arithmetic progression of common difference dd with initial term 0. What makes this case rather natural is that all order gaps are multiple of the common difference dd, and here we have δσ~=d\delta_{\tilde{\sigma}}=d. This implies that the normal form of pp can be seen as follows:

p(x,σd(x),σ2d(x),σ3d(x),,σdk(x),).p(x,\sigma^{d}(x),\sigma^{2d}(x),\sigma^{3d}(x),\ldots,\sigma^{dk}(x),\ldots). (35)

The desired endomorphism is thus defined by σ~=σd\tilde{\sigma}=\sigma^{d}.

Theorem 5.1.

Let dd be a positive integer. If (s(n))n(s(n))_{n\in\mathbb{N}} is D-algebraic then so is (s(dn))n(s(dn))_{n\in\mathbb{N}}.

Proof.

For cleaner formulation, we will use the following iterative notation:

For NN variables x1,,xNx_{1},\ldots,x_{N} and a function ff in NN variables, we write

x1,x2,,xN=xi¯i,\displaystyle x_{1},x_{2},\ldots,x_{N}=\underline{x_{i}}_{i},
f(f(x1),f(x2),,f(xN))=f(f(xi)¯i),\displaystyle f(f(x_{1}),f(x_{2}),\ldots,f(x_{N}))=f\left(\underline{f(x_{i})}_{i}\right),
f(f(x2),f(x3),,f(xN))=f(f(xi1)¯i)=f(f(xi>1)¯i).\displaystyle f(f(x_{2}),f(x_{3}),\ldots,f(x_{N}))=f\left(\underline{f(x_{i\neq 1})}_{i}\right)=f\left(\underline{f(x_{i>1})}_{i}\right).

Let σ~=σd\tilde{\sigma}=\sigma^{d} and p𝒟σ(x,x)p\in\mathcal{D}_{\sigma}(x,x) of order rr such that

p(s(n))=0, for all n.p(s(n))=0,\,\text{ for all }n\in\mathbb{N}.

Define

y1=x,y2=σ(x),,yd=σd1(x).y_{1}=x,\,y_{2}=\sigma(x),\ldots,y_{d}=\sigma^{d-1}(x). (36)

Let r1,r0r_{1},r_{0} be the quotient and remainder of the Euclidean division of r+1r+1 by dd: r+1=dr1+r0r+1=d\,r_{1}+r_{0}. We can rewrite

p(x,σ(x),,σr(x)),p(x,\sigma(x),\ldots,\sigma^{r}(x)),

as

p(y1,y2,,yd,σ~(y1),σ~(y2),,σ~r1(y1),σ~r1(y2),,σ~r1(yr0)).p\Big{(}y_{1},y_{2},\ldots,y_{d},\tilde{\sigma}(y_{1}),\tilde{\sigma}(y_{2}),\ldots,\tilde{\sigma}^{r_{1}}(y_{1}),\tilde{\sigma}^{r_{1}}(y_{2}),\ldots,\tilde{\sigma}^{r_{1}}(y_{r_{0}})\Big{)}. (37)

The latter is a multivariate difference polynomial in

𝒟σ~(𝕂,{y1,y2,,yd}).\mathcal{D}_{\tilde{\sigma}}(\mathbb{K},\{y_{1},y_{2},\ldots,y_{d}\}).

Our aim is to eliminate the difference indeterminates yjy_{j}, j>1j>1. To do so, we build a radical-rational dynamical system and apply Algorithm 1. This will yield a univariate difference polynomial in y1y_{1} that has (s(dn))n(s(dn))_{n\in\mathbb{N}} as a zero. Let mm be the degree of σr(x)\sigma^{r}(x) in pp and RpR_{p} be the rational expression obtained by solving p=0p=0 for (σr(x))m(\sigma^{r}(x))^{m}. Let yi,j,i=1,,dy_{i,j},i=1,\ldots,d, j=0,,r1j=0,\ldots,r_{1} be new indeterminates such that

yi,0=yi,i=1,,d,\displaystyle y_{i,0}=y_{i},i=1,\ldots,d, (38)
σ~(yi,j)=yi,j+1,i=1,,d,j=0,,r12,\displaystyle\tilde{\sigma}(y_{i,j})=y_{i,j+1},\,i=1,\ldots,d,\,j=0,\ldots,r_{1}-2, (39)
σ~(yi,r11)=yi,r1,i=1,,r01,\displaystyle\tilde{\sigma}(y_{i,r_{1}-1})=y_{i,r_{1}},\,i=1,\ldots,r_{0}-1, (40)
σ~(yr0,r11)m=Rp(yi,j¯i,j,σ~(yr0,r11)),\displaystyle\tilde{\sigma}(y_{r_{0},r_{1}-1})^{m}=R_{p}\left(\underline{y_{i,j}}_{i,j},\tilde{\sigma}(y_{r_{0},r_{1}-1})\right), (41)
σ~(yr0+k,r11)m=Rp(yik,0¯i,yi,j0¯i,j,σ~(yr0ir0+k,r11)¯i),k=1,,dr0\displaystyle\begin{split}&\tilde{\sigma}(y_{r_{0}+k,r_{1}-1})^{m}=R_{p}\left(\underline{y_{i\geq k,0}}_{i},\underline{y_{i,j\neq 0}}_{i,j},\underline{\tilde{\sigma}(y_{r_{0}\leq i\leq r_{0}+k,r_{1}-1})}_{i}\right),\\ &k=1,\ldots,d-r_{0}\end{split} (42)

and

σ~(yk,r1)m=Rp(yidr0+k,0¯i,yi,j0¯i,j,σ~(yr0ir0+k,r1)¯i,σ~(yik,r1)¯i),k=1,,r01.\begin{split}&\tilde{\sigma}(y_{k,r_{1}})^{m}=R_{p}\Big{(}\underline{y_{i\geq d-r_{0}+k,0}}_{i},\underline{y_{i,j\neq 0}}_{i,j},\underline{\tilde{\sigma}(y_{r_{0}\leq i\leq r_{0}+k,r_{1}})}_{i},\underline{\tilde{\sigma}(y_{i\leq k,r_{1}})}_{i}\Big{)},\\ &k=1,\ldots,r_{0}-1.\end{split} (43)

The equations in (39)–(43) define the desired dynamical system together with the output equation z=y1,0z=y_{1,0}. ∎

Corollary 5.2.

Let dd be a positive integer. If (s(n))n(s(n))_{n\in\mathbb{N}} is D-algebraic of order rr in 𝒟σ(𝕂,x)\mathcal{D}_{\sigma}(\mathbb{K},x), then (s(dn))n(s(dn))_{n\in\mathbb{N}} is D-algebraic of order at most rr in 𝒟σd(𝕂,x)\mathcal{D}_{\sigma^{d}}(\mathbb{K},x). In other words, (s(dn))n(s(dn))_{n\in\mathbb{N}} is D-algebraic of order at most drdr in 𝒟σ(𝕂,x)\mathcal{D}_{\sigma}(\mathbb{K},x).

Proof.

The proof reduces to determining the dimension of the dynamical system obtained in the proof of Theorem 5.1. Indeed, we have

(r11)d equations from (39),\displaystyle(r_{1}-1)d\,\text{ equations from }\,\eqref{eq:syssub1}, (44)
r01 equations from (40),\displaystyle r_{0}-1\,\text{ equations from }\,\eqref{eq:syssub2}, (45)
1 equation from (41),\displaystyle 1\,\text{ equation from }\,\eqref{eq:syssub3}, (46)
dr0 equations from (LABEL:eq:syssub4),\displaystyle d-r_{0}\,\text{ equations from }\,\eqref{eq:syssub4}, (47)
r01 equations from (43),\displaystyle r_{0}-1\,\text{ equations from }\,\eqref{eq:syssubfin}, (48)

which give a total of

dr1+r01=r+11=r,dr_{1}+r_{0}-1=r+1-1=r, (49)

representing the dimension of the dynamical system and the order of (s(n))n(s(n))_{n}. ∎

Example 5.3 (Illustrative example: r=4,d=3r=4,d=3).

We have r1=r0=1r_{1}=r_{0}=1, σ~=σ3\tilde{\sigma}=\sigma^{3} and p=p(x,σ(x),,σ4(x))p=p(x,\sigma(x),\ldots,\sigma^{4}(x)). We build our dynamical system with the difference indeterminates y1,0,y2,0,y3,0y_{1,0},y_{2,0},y_{3,0} and y1,1y_{1,1}. This yields

{σ~(y1,0)=y1,1σ~(y2,0)m=Rp(y1,0,y2,0,y3,0,y1,1,σ~(y2,0))σ~(y3,0)m=Rp(y2,0,y3,0,y1,1,σ~(y2,0),σ~(y3,0))σ~(y1,1)m=Rp(y3,0,y1,1,σ~(y2,0),σ~(y3,0),σ~(y1,1))z=y1,0.\begin{cases}\tilde{\sigma}(y_{1,0})=y_{1,1}\\ \tilde{\sigma}(y_{2,0})^{m}=R_{p}(y_{1,0},y_{2,0},y_{3,0},y_{1,1},\tilde{\sigma}(y_{2,0}))\\ \tilde{\sigma}(y_{3,0})^{m}=R_{p}(y_{2,0},y_{3,0},y_{1,1},\tilde{\sigma}(y_{2,0}),\tilde{\sigma}(y_{3,0}))\\ \tilde{\sigma}(y_{1,1})^{m}=R_{p}(y_{3,0},y_{1,1},\tilde{\sigma}(y_{2,0}),\tilde{\sigma}(y_{3,0}),\tilde{\sigma}(y_{1,1}))\\ z=y_{1,0}\end{cases}. (50)

\blacksquare

Remark 5.4.

The recurrence equation of the subsequence need not be written in the same difference ring as the equation of the original sequence. In Theorem 5.1, both (s(n))n(s(n))_{n\in\mathbb{N}} and (s(dn))n(s(dn))_{n\in\mathbb{N}} are zeros of the constructed difference polynomial of order drdr in 𝒟σ(𝕂,x)\mathcal{D}_{\sigma}(\mathbb{K},x), but (s(n))n(s(n))_{n} is generally not a zero of the corresponding difference polynomial of order rr in 𝒟σd(𝕂,x)\mathcal{D}_{\sigma^{d}}(\mathbb{K},x). This is illustrated in the next example.

Example 5.5 (Explicit example: Catalan numbers at (3n)n(3n)_{n\in\mathbb{N}}).

In Section 4.1, Example 4.4, we used the implementation from [TTW24] to convert the holonomic equation of Catalan numbers (C(n))n(C(n))_{n\in\mathbb{N}} to the recursion

s(n+2)=2s(n+1)(8s(n)+s(n+1))10s(n)s(n+1)=Rp(s(n),s(n+1)),s(n+2)=\frac{2s(n+1)\left(8s(n)+s(n+1)\right)}{10s(n)-s(n+1)}=R_{p}(s(n),s(n+1)), (51)

with p=(10xσ(x))σ2(x)2σ(x)(8x+σ(x))p=(10x-\sigma(x))\sigma^{2}(x)-2\sigma(x)(8x+\sigma(x)). Thus, the corresponding dynamical system in 𝒟σ~(𝕂,x)\mathcal{D}_{\tilde{\sigma}}(\mathbb{K},x), with σ~=σ3\tilde{\sigma}=\sigma^{3}, is given by

{σ~(y1,0)=2(16y1,0y2,0)(8y1,0+y2,0)y2,0(7y1,0y2,0)(10y1,0y2,0)σ~(y2,0)=4(16y1,0y2,0)(8y1,0+y2,0)y2,0(8y1,0y2,0)(6y1,0y2,0)(7y1,0y2,0)(10y1,0y2,0)z=y1,0.\begin{cases}\tilde{\sigma}(y_{1,0})=\frac{2(16y_{1,0}-y_{2,0})(8y_{1,0}+y_{2,0})y_{2,0}}{(7y_{1,0}-y_{2,0})(10y_{1,0}-y_{2,0})}\\[8.53581pt] \tilde{\sigma}(y_{2,0})=\frac{4(16y_{1,0}-y_{2,0})(8y_{1,0}+y_{2,0})y_{2,0}(8y_{1,0}-y_{2,0})}{(6y_{1,0}-y_{2,0})(7y_{1,0}-y_{2,0})(10y_{1,0}-y_{2,0})}\\ z=y_{1,0}\end{cases}. (52)

We obtain the equation

343597383680s(n)3s(n+1)369004689408s(n)3s(n+1)2s(n+2)+4274823168s(n)3s(n+1)s(n+2)283243160s(n)3s(n+2)31258291200s(n)2s(n+1)4+266514432s(n)2s(n+1)3s(n+2)26883000s(n)2s(n+1)2s(n+2)2+1043658s(n)2s(n+1)s(n+2)3122880s(n)s(n+1)5101544s(n)s(n+1)4s(n+2)+65067s(n)s(n+1)3s(n+2)24113s(n)s(n+1)2s(n+2)3+1400s(n+1)630s(n+1)5s(n+2)75s(n+1)4s(n+2)2+5s(n+1)3s(n+2)3=0.343597383680s(n)^{3}s(n+1)^{3}-69004689408s(n)^{3}s(n+1)^{2}s(n+2)+4274823168s(n)^{3}s(n+1)s(n+2)^{2}\\ -83243160s(n)^{3}s(n+2)^{3}-1258291200s(n)^{2}s(n+1)^{4}+266514432s(n)^{2}s(n+1)^{3}s(n+2)\\ -26883000s(n)^{2}s(n+1)^{2}s(n+2)^{2}+1043658s(n)^{2}s(n+1)s(n+2)^{3}-122880s(n)s(n+1)^{5}\\ -101544s(n)s(n+1)^{4}s(n+2)+65067s(n)s(n+1)^{3}s(n+2)^{2}-4113s(n)s(n+1)^{2}s(n+2)^{3}\\ +1400s(n+1)^{6}-30s(n+1)^{5}s(n+2)-75s(n+1)^{4}s(n+2)^{2}+5s(n+1)^{3}s(n+2)^{3}=0. (53)

One verifies that (C(n))n(C(n))_{n} is not a solution of (53). Note that higher-order equations may be obtained here. Indeed, (C(3n))n(C(3n))_{n} is holonomic of order 11 and degree 33 and therefore satisfies an l.h.s. algebraic difference equation of order at most 44 by Theorem 4.2. Our Gröbner bases method from [TTW24] yields an equation of order 33. \blacksquare

Returning to our introductory motivation—the acceleration of sequences in numerical analysis—we have demonstrated a method for deriving equations for subsequences of D-algebraic sequences, indexed by arithmetic progressions. The method may be generalized to a broader class of subsequences. This work suggests a potential bridge between difference algebra and classical acceleration techniques (see [BDGB83]). Careful selection of subsequences based on these computations may lead to the development of new effective methods for accelerating convergence.

Acknowledgments

The author gratefully acknowledges Filip Mazowiecki and James Worrell for stimulating discussions regarding [CDBMP23]. This work was supported by UKRI Frontier Research Grant EP/X033813/1.


Author’s address:

Bertrand Teguia Tabuguia, University of Oxford [email protected]

References

  • [ADD+13] Rajeev Alur, Loris D’Antoni, Jyotirmoy V. Deshmukh, Mukund Raghothaman, and Yifei Yuan. Regular functions and cost register automata. In 28th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2013, New Orleans, LA, USA, June 25-28, 2013, pages 13–22. IEEE Computer Society, 2013.
  • [AEMSTT24] Rida Ait El Manssour, Anna-Laura Sattelberger, and Bertrand Teguia Tabuguia. D-algebraic functions. Journal of Symbolic Computation, page 102377, 2024.
  • [Ait27] A. C. Aitken. Xxv.—on bernoulli’s numerical solution of algebraic equations. Proceedings of the Royal Society of Edinburgh, 46:289–305, 1927.
  • [BCR24] Alin Bostan, Xavier Caruso, and Julien Roques. Algebraic solutions of linear differential equations: an arithmetic approach. Bulletin of the American Mathematical Society, 61(4):609–658, 2024.
  • [BDGB83] C Brezinski, JP Delahaye, and B Germain-Bonne. Convergence acceleration by extraction of linear subsequences. SIAM journal on numerical analysis, 20(6):1099–1105, 1983.
  • [BDSW17] Michael Benedikt, Timothy Duff, Aditya Sharad, and James Worrell. Polynomial automata: Zeroness and applications. In 2017 32nd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS), pages 1–12. IEEE, 2017.
  • [BJ75] George A Baker Jr. Essentials of Padé Approximants. Academic Press, Inc. London, 1975.
  • [BLOP95] François Boulier, Daniel Lazard, François Ollivier, and Michel Petitot. Representation for the radical of a finitely generated differential ideal. In Proceedings of the 1995 International Symposium on Symbolic and Algebraic Computation, pages 158–166, 1995.
  • [BM76] Jean Berstel and Maurice Mignotte. Deux propriétés décidables des suites récurrentes linéaires. Bulletin de la Societe mathematique de France, 104:175–184, 1976.
  • [Bre85] Claude Brezinski. Convergence acceleration methods: The past decade. Journal of Computational and Applied Mathematics, 12:19–36, 1985.
  • [CDBMP23] Lorenzo Clemente, Maria Donten-Bury, Filip Mazowiecki, and Michał Pilipczuk. On rational recursive sequences. In 40th International Symposium on Theoretical Aspects of Computer Science (STACS 2023). Schloss-Dagstuhl-Leibniz Zentrum für Informatik, 2023.
  • [Coh48] Richard M Cohn. Manifolds of difference polynomials. Transactions of the American Mathematical Society, 64(1):133–172, 1948.
  • [Coh65] Richard Cohn. Difference Algebra. Interscience, New York, 1965.
  • [DGHP23] Ruiwen Dong, Christian Goodbrake, Heather A Harrington, and Gleb Pogudin. Differential elimination for dynamical models via projections with applications to structural identifiability. SIAM Journal on Applied Algebra and Geometry, 7(1):194–235, 2023.
  • [EZ14] Shalosh B Ekhad and Doron Zeilberger. How to generate as many Somos-like miracles as you wish. Journal of Difference Equations and Applications, 20(5-6):852–858, 2014.
  • [GVDHYZ09] Xiao-Shan Gao, Joris Van Der Hoeven, Chun-Ming Yuan, and Gui-Lin Zhang. Characteristic set method for differential–difference polynomial systems. Journal of Symbolic Computation, 44(9):1137–1163, 2009.
  • [Hub03] Evelyne Hubert. Notes on triangular sets and triangulation-decomposition algorithms I: Polynomial systems. In Symbolic and Numerical Scientific Computation: Second International Conference, SNSC 2001, Hagenberg, Austria, September 12–14, 2001. Revised Papers, pages 1–39. Springer, 2003.
  • [JPNP23] Antonio Jiménez-Pastor, Philipp Nuspl, and Veronika Pillwein. An extension of holonomic sequences: C2C^{2}-finite sequences. Journal of Symbolic Computation, 116:400–424, 2023.
  • [JPPS20] Antonio Jiménez-Pastor, Veronika Pillwein, and Michael F Singer. Some structural results on DnD^{n}-finite functions. Advances in Applied Mathematics, 117:102027, 2020.
  • [Kau23] Manuel Kauers. D-Finite Functions. Springer, 2023.
  • [Kol73] Ellis Robert Kolchin. Differential Algebra and Algebraic Groups. Academic press, 1973.
  • [KP11] Manuel Kauers and Peter Paule. The concrete tetrahedron. texts and monographs in symbolic computation. Springer, Wien, 11:12, 2011.
  • [Lev08] Alexander Levin. Difference Algebra, volume 8. Springer Science & Business Media, 2008.
  • [Mal92] Janice L Malouf. An integer sequence from a rational recursion. Discrete mathematics, 110(1-3):257–261, 1992.
  • [OPS20] Alexey Ovchinnikov, Gleb Pogudin, and Thomas Scanlon. Effective difference elimination and nullstellensatz. Journal of the European Mathematical Society, 22(8):2419–2452, 2020.
  • [OPV16] Alexey Ovchinnikov, Gleb Pogudin, and N Thieu Vo. Effective differential elimination. arXiv preprint arXiv:1610.04022, 2016.
  • [OW12] Joël Ouaknine and James Worrell. Decision problems for linear recurrence sequences. In International Workshop on Reachability Problems, pages 21–28. Springer, 2012.
  • [PSW20] Gleb Pogudin, Thomas Scanlon, and Michael Wibmer. Solving difference equations in sequences: universality and undecidability. In Forum of Mathematics, Sigma, volume 8, page e33. Cambridge University Press, 2020.
  • [RA04] Lih-Ing W. Roeger and Linda J.S. Allen†. Discrete may–leonard competition models i. Journal of Difference Equations and Applications, 10(1):77–98, 2004.
  • [Rau34] HW Raudenbush. Ideal theory and algebraic differential equations. Transactions of the American Mathematical Society, 36(2):361–368, 1934.
  • [Rit50] Joseph Fels Ritt. Differential Algebra, volume 33. American Mathematical Soc., 1950.
  • [Rob14] Daniel Robertz. Formal Algorithmic Elimination for PDEs, volume 2121. Springer, 2014.
  • [Ros59] Azriel Rosenfeld. Specializations in differential algebra. Transactions of the American Mathematical Society, 90(3):394–407, 1959.
  • [S+03] Neil JA Sloane et al. The online encyclopedia of integer sequences, 2003.
  • [TT23] Bertrand Teguia Tabuguia. Operations for D-algebraic functions. ACM Communications in Computer Algebra, 57(2):51–56, 2023.
  • [TT25] Bertrand Teguia Tabuguia. Arithmetic of D-algebraic functions. Journal of Symbolic Computation, 126:102348, 2025.
  • [TTK21] Bertrand Teguia Tabuguia and Wolfram Koepf. On the representation of non-holonomic univariate power series. Maple Transactions, 2(1), 2021.
  • [TTW24] Bertrand Teguia Tabuguia and James Worrell. On rational recursion for holonomic sequences. In International Workshop on Computer Algebra in Scientific Computing, pages 314–327. Springer, 2024.
  • [vDH19] Joris van Der Hoeven. Computing with D-algebraic power series. Applicable Algebra in Engineering, Communication and Computing, 30(1):17–49, 2019.
  • [Wen89] Ernst Joachim Weniger. Nonlinear sequence transformations for the acceleration of convergence and the summation of divergent series. Computer Physics Reports, 10(5-6):189–371, 1989.
  • [Wib21] Michael Wibmer. On the dimension of systems of algebraic difference equations. Advances in Applied Mathematics, 123:102136, 2021.