arXiv:1901.03672v1 [math.CA] 11 Jan 2019 he-emrcrec eaina pca ucin.Tet The functions. special retode as or relation classical recurrence identify to three-term developed were Schmersau and Koepf hsmnsrp,teMpeimplementation Maple the manuscript, this optragba al,Tretr eurneequation, recurrence Three-term Maple, algebra, Computer Keywords: Inter Applications. 14th and the Functions during Special Alhaidari Polynomials, by submitted problem open or an quadratic on polynomials orthogonal classical eald h al implementations Maple The recalled. 34,3D5 39,42C05 33F99, 33D45, 33C45, MSC: 2010 di atc aif eododrdvdddi divided second-order a satisfy lattice rpitsbitdto submitted Preprint .Introduction 1. system polynomial orthogonal classical Every Abstract with ehdt eietecoe the derive to method where ereoe epciey h operators the respectively, one, degree h type the ff eurneeutosadtercasclotooa polyn orthogonal classical their and equations Recurrence rneeutosstse yotooa oyoil naqu a on polynomials orthogonal by satisfied equations erence opugin hwdi [ in showed Foupouagnigni mi address: Email C φ n A ( onthnl lsia rhgnlplnmaso quadrat a on polynomials orthogonal classical handle not do D x nttt fMteais nvriyo asl Heinrich- Kassel, of University Mathematics, of Institute n ) x A f = n ( − x 1 ax ( s ouin naqartcor quadratic a on solutions > p )) [email protected] 2 n + + = .Mroe,Fvr’ hoe ttsta h ovrei tr is converse the that states theorem Favard’s Moreover, 0. φ 1 ( ( bx x x f ( ) ( s x + = ffi )) x ( ( s D c cients ( s , A + 2 x + ψ n p 2 1 x 4 ( n 2 1 )) x ( htcasclotooa oyoil naqartcor quadratic a on polynomials orthogonal classical that ] + ) x ) A − − ( B = s n )) , n x f ) ( B ailDvo Tcheutia Duviol Daniel ( dx p s + x n D n ( − ff , Dne uilTcheutia) Duviol (Daniel rec2ortho ( ψ s + C x x rneeuto fteform the of equation erence ( − 1 2 ) and n x e ) − ( retode ntrso h oyoilcoe polynomial the of terms in 1 2 ( s )) d C )) S , n S , p x p x n r ie by given are q n D ( ) r oyoil fdge tms n of and 2 most at degree of polynomials are 0), − S qartcltie n oase sapplication as answer to and lattices -quadratic x 1 x x fKowne n wrtu or Swarttouw and Koorwinder of aifisatretr eurnerlto of relation recurrence three-term a satisfies ) fKefadShesui xeddt cover to extended is Schmersau and Koepf of ( p f x n ( ( ) ( x q x ( n ( lt t.4,312Kse,Germany Kassel, 34132 40, Str. Plett qartclattice -quadratic s s )) = )) oimplementations wo Divided-di = + 0 hgnlplnmasgvnb their by given polynomials thogonal ainlSmoimo Orthogonal on Symposium national , λ 1 f n , ( p 2 x dai or adratic ( n , . . . , s ( x + ( cor ic ff s 2 1 )) p rneequation. erence )) − = 1 ffi + 2 q ≡ 0 inso h divided- the of cients qartcltie In lattice. -quadratic q f , qartcltieis lattice -quadratic 0) ( x , ( rec2ortho s e general A ue. − aur 4 2019 14, January 1 2 omial )) retode q , -quadratic and (1) of and x(s) is a quadratic or q-quadratic lattice defined by [11]

s s c1q + c2q− + c3 if 0 < q < 1, x(s) = 2 c1,..., c6 C. ( c4 s + c5 s + c6 if q = 1, ∈ Note that (1) is equivalent to a difference or q-difference equation of the form (see [9, chaps. 9, 14]) λ y(x(s)) = B(s)y(x(s + 1)) (B(s) + D(s))y(x(s)) + D(s)y(x(s 1)), (2) n − − with 1 1 1 φ(x(s)) = x(s + ) x(s ) (x(s + 1) x(s))B(s) + (x(s) x(s 1))D(s) , 2 2 2 −  − −  − − −  ψ(x(s)) = (x(s) x(s + 1))B(s) + (x(s) x(s 1))D(s). − − − Following the work by Foupouagnigni [4], Njionou Sadjang et al. [13] proved that the Wilson and the continuous dual are solutions of a divided-difference equation of the form

2 φ(x)Dx pn(x) + ψ(x)SxDx pn(x) + λn pn(x) = 0, (3) where the operators Sx and the Wilson operator (see [3], [6]) Dx are defined by

i i i i f x + 2 f x 2 f x + 2 + f x 2 D f (x) = − − , S f (x) = − . x  2ix   x   2   Using the same approach, Tcheutia et al. [17] derived a divided–difference equation of type

2 φ(x)δxy(x) + ψ(x)Sxδxy(x) + λny(x) = 0, (4) satisfied by the continuous Hahn and the Meixner–Pollaczek polynomials, where the difference operator δx (see [15, p. 436], compare [9, p. 201 and 214], [12, 14], [18, Equation (1.15)]) is defined as follows: + i i f x 2 f x 2 δ f (x) = − − . x   i   (3) and (4) are equivalent to the difference equation (see [9, chap. 9])

λ y(x) = B(x)y(x + i) (B(x) + D(x))y(x) + D(x)y(x i), (5) n − − with φ(x) = x((2x + i)B(x) + (2x i)D(x)), ψ(x) = i((2x + i)B(x) (2x i)D(x)), − − − − and 1 φ(x) = (B(x) + D(x)), ψ(x) = i(B(x) D(x)), 2 − − respectively. The coefficients of the divided-difference equations given in the forms (1), (3) or (4) can be used for instance to compute the three–term recurrence relation or some structure formulae, the 2 inversion coefficients of classical on a quadratic and q-quadratic lattice (see e. g. [5], [13], [16], [17] and references therein). Every classical orthogonal polynomial system pn(x) satisfies a three-term recurrence relation of the type pn+1(x) = (An x + Bn)pn(x) Cn pn 1(x) (n = 0, 1, 2,..., p 1 0), (6) − − − ≡ with CnAnAn 1 > 0. Moreover, Favard’s theorem states that the converse is true. In Section 2, a general method− to derive such three–term recurrence relations for classical orthogonal polynomials on a quadratic or q-quadratic lattice in terms of the given polynomials φ(x) and ψ(x) will be recalled. Alhaidari [1] submitted (as open problem during the 14th International Symposium on Orthogonal Polynomials, Special Functions and Applications) two polynomials defined by their three-term recurrence relations and initial values. He was interested by the derivation of their weight functions, generating functions, orthogonality relations, etc.. In order to solve this problem as suggested in the comments by W. Van Assche in [2], we use the computer algebra system Maple to identify the polynomials from their recurrence relations, such as in the Maple implementation rec2ortho of Koorwinder and Swarttouw [10] or retode of Koepf and Schmersau [8]. The two implementations rec2ortho and retode do not handle classical orthogonal polynomials on a quadratic or q-quadratic lattice. In Section 3, we extend the Maple implementation retode of Koepf and Schmersau [8] to cover classical orthogonal polynomials on a quadratic or q-quadratic lattice and to answer the problem by Alhaidari [1] as application.

2. Three-term recurrence equation satisfied by classical orthogonal polynomials on a quadratic or q-quadratic lattices We recall the definition of the Pochhammer symbol (or shifted factorial) given by Γ(a + m) (a) = = a(a + 1)(a + 2) (a + m 1), m = 0, 1, 2,..., m Γ(a) ··· − and the q-Pochhammer symbol

m 1 − (1 aq j) if m = 1, 2, 3,... (a; q)m =  j=0 −  Q  1 if m = 0.  We set the following polynomial basis:

n 1 s s − k 2 2k B (a, x) = (aq ; q) (aq− ; q) = (1 2axq + a q ), n 1, B (a, x) 1, (7) n n n − ≥ 0 ≡ Yk=0 qs + q s where x = x(s) = cos θ = − , qs = eiθ; 2 ϑ (a, x) = (a + ix) (a ix) ; (8) n n − n

3 n 1 x x+1 − 2k+1 k ξn(γ, δ, µ(x)) = (q− ; q)n(γδq ; q)n = (1 + γδq µ(x)q ), n 1,  k=0 − ≥ (9)  Q  ξ0(γ, δ, µ(x)) 1,  ≡  x x+1 with µ(x) =q− + γδq ;

n 1 χ (γ, δ, λ(x)) = ( x) (x + γ + δ + 1) = − k(γ + δ + k + 1) λ(x) , n 1, n n n (10)  − k=0  −  ≥  χ (γ, δ, λ(x)) 1, Q  0 ≡  for λ(x) = x(x + γ + δ + 1). From the hypergeometric and the basic hypergeometric representations (see [9, chaps. 9, 14]) of classical orthogonal polynomials on a quadratic or q-quadratic lattice, their natural bases are B (a, x) , (a + ix) , ξ (γ, δ, µ(x)) or χ (γ,δ,λ(x)) whose elements are { n } { n} { n } { n } polynomials of degree n in the variables x, x, µ(x) or λ(x), respectively, and the basis ϑn(a, x) 2 { } whose elements are polynomials of degree n in the variable x . The operator Dx is appropriate for B (a, x), ξ (γ, δ, µ(x)) and χ (γ,δ,λ(x)), δ is appropriate for (a+ix) , whereas the corresponding n n n x { n} operator for the basis ϑn(a, x) is Dx. Starting from a di{fference} equation of type (2) or (5) given in [9], we deduce the divided- difference equation of type (1), (3) or(4) satisfied by each classical orthogonal polynomial on a quadratic or q-quadratic lattice. Some of them can be found in [4], [13], [17] and we recall all of them here to make the manuscript self-contained. They will also be recovered using the algorithms implemented in this manuscript.

2.1. Polynomials expanded in the basis ϑ (α, x) { n } In this basis are expanded: 1. the Wilson polynomials

n, n + a + b + c + d 1, a + ix, a ix W (x2; a, b, c, d) = (a + b) (a + c) (a + d) F − − − 1 , n n n n4 3 a + b, a + c, a + d !

with

φ(x) = (x2 (cd + ab + ac + bc + bd + ad) x + abcd), − ψ(x) = (a + b + c + d)x abc abd acd bcd, λ = n(n 1 + a + b + c + d); − − − − n − − 2. the continuous

2 n, a + ix, a ix S n(x ; a, b, c) = (a + b)n(a + c)n3F2 − − 1 , a + b, a + c !

with φ(x) = (a + b + c) x + abc, ψ(x) = x (bc + ab + ac), λ = n. − − n − The procedure to find the coefficients of the recurrence equation (6) (with x substituted by x2) in terms of the coefficients a, b, c, d, e of φ(x) and ψ(x) is as follows (cf. [5, 7, 8, 13, 17]):

4 1. Substitute 2 pn(x):= pn(x ) = knϑn(α, x) + kn′ ϑn(α, x) + kn′′ϑn 2(α, x) + ... (11) − in the divided-difference equation (3) (with x substituted by x2). Next multiply this equation by ϑ1(α, x) and use the relations [13]

2 ϑ1(α, x)Dxϑn(α, x) = η(n)η(n 1)ϑn 1(α, x), − − 1 ϑ1(α, x)SxDxϑn(α, x) = η(n) β(α + , n 1)ϑn 1(α, x) + ϑn(α, x) , 2 − − !

ϑ1(α, x)ϑn(α, x) = ν(α, n)ϑn(α, x) + ϑn+1(α, x), with 1 η(n) = n, β(α, n) = n(n + α ), ν(α, n) = (n2 + 2αn). − − 2 − 2 4 2. To eliminate the terms x ϑn(α, x) and x ϑn(α, x), use twice the relation [13]

2 2 x ϑ (α, x) = (n + α) ϑ (α, x) + ϑ + (α, x). (12) n − n n 1 3. Equating the coefficients of ϑ + (α, x) gives λ = n((n 1)a + d) in (3). Equating the n 1 n − − coefficients of ϑn(α, x) and ϑn 1(α, x) gives kn′ /kn, kn′′/kn Q(n). − ∈ 4. Substitute the expression of pn given by (11) in the recurrence relation (6) (with x substituted 2 by x ) and use (12). By equating the coefficients of ϑn+1(α, x), ϑn(α, x), ϑn 1(α, x), we get − An, Bn and Cn, respectively, in terms of kn, kn′ and kn′′. 5. Substituting the values of kn′ and kn′′ given in step 3 in these equations yields the three un- knowns in terms of a, b, c, d, e, n, kn 1, kn, kn+1. − 2 Proposition 1. Let pn(x) := pn(x ) = knϑn(α, x) + kn′ ϑn(α, x) + kn′′ϑn 2(α, x) + ... (n N0) be a family of polynomial solutions of the divided-difference equation (3). Then− the recurrence∈ equation (6) (with x substituted by x2) holds with

kn An = 1, kn+1 n (n 1) a 2 an2 2 an + 4 nd 2 b d nd (2 b + d 2 nd) + e (2 a d) kn − − − − − − − Bn =   , k + − ((2 n 2) a + d) (2 an + d) n 1 − kn 1 n (an 2 a + d) 6 3 2 − = + Cn − 2 (n 1) a (n 1) db kn+1 (2 an a + d) (2 an 3 a + d) (2 an 2 a + d) × − − − − − n + 2 (n 1)4 b + 3 (n 1)5 d 4 c (n 1)2 a2 + 2 (n 1)2 d2 + de b + ( en c + e) d2 − − − − −  − −  − − + (n 1)2 b2 4 (n 1)3 db + 3 (n 1)4 d2 (n 1) (en + 4 c e) d e2 a + (n 1)3 d3 . − − − − − − − − −   o 2.2. Polynomials expanded in the basis (α + ix) { n} The polynomials expanded in this basis are: 1. the continuous Hahn polynomials (a + c) (a + d) n, n + a + b + c + d 1, a + ix p (x; a, b, c, d) = in n n F − − 1 , n n! 3 2 a + c, a + d !

5 with

φ(x) = 2 x2 i (a + b c d) x cd ab, ψ(x) = 2 (a + b + c + d) x 2 i (ab cd) ; − − − − − − − 2. the Meixner-Pollaczek polynomials

(λ) (2λ)n inθ n,λ + ix 2iθ P (x; θ) = e 2F1 − 1 e− , n n! 2λ − !

with φ(x) = x cos (θ) λ sin (θ) , ψ(x) = 2 (x sin (θ) + λ cos (θ)) . − The action of the operators δx and Sx on the basis (α + ix)n is given by [17]

2 (α + ix)δx(α + ix)n = n(n 1)(α + ix)n 1; − − − n(n 1) (α + ix)Sxδx(α + ix)n = ni(α + ix)n − i(α + ix)n 1; − 2 − (α + ix)(α + ix) = (α + ix) + n(α + ix) ; n n 1 − n x(α + ix) = i(α + ix) + + i(n + α)(α + ix) . n − n 1 n We suppose that

pn(x) = kn(α + ix)n + kn′ (α + ix)n 1 + kn′′(α + ix)n 2 + .... − −

Using the same approach as in section 2.1, it follows that λn = n((n 1)a + d)in (4) and the following result holds. − −

Proposition 2. Let pn(x) = kn(α + ix)n + kn′ (α + ix)n 1 + kn′′(α + ix)n 2 + ... (n N0) be a family of polynomial solutions of the divided-difference equation− (4). Then the− recurrence∈ equation (6) is valid with

kn An = i, kn+1 2 bn2 2 bn 2 e a + d (2 bn + e) kn − − Bn = i  , k + (2 an 2 a + d) (2 an + d) n 1 − kn 1 4 5 2 3 2 4 − C = n 8 n (n 2) (n 1) a + 4 7 n 13 n + 2 (n 1) d + 32 cn (n 2) (n 1) a k n − − − − − − − − n+1 n     + 8 n (n 2) (n 1)2 b2 2 19 n2 34 n + 10 (n 1)2 d2 + 16 c (n 1) 5 n2 9 n + 2 d  − − − −  −  − −  −  + 8 e2n (n 2) a3 + 4 (n 1) 5 n2 9 n + 2 db2 8 en (n 2) db + 72 n2 128 n + 48 d2c −   − −  −  − −  −  (n 1) (5 n 3) (5 n 6) d3 + (12 n 8) e2d a2 + 4 (4 n 3) (n 1) d2b2 + ( 12 n + 8) ed2b − − − − −   − − − − + (28 n 24) d3c (8 n 7) (n 1) d4 + 4 e2d2 a + ( 4 n + 4) d3b2 4 bd3e + (1 n) d5 + 4 cd4 − − − −  − − − o 4 (2 an 2 a + d)2 (2 an 3 a + d) (2 an + d) (2 an a + d) . − − − .n 6 o 2.3. Polynomials expanded in the basis χ (γ,δ,λ(x)) { n } In this basis, we have: 1. the Racah polynomials

n, n + α + β + 1, x, x + γ + δ + 1 Rn(λ(x); α,β,γ,δ) = 4F3 − − 1 , n = 0, 1,..., N, α + 1,β + δ + 1,γ + 1 ! with 1 φ(λ(x)) = λ(x)2 + 2 γ + γ α + 2 γ δ + γβ + 3 α + 2 δ + 2 αβ + 2  δ α + 3 β + 4 δβ λ(x) + 1/2 (γ + 1) (1 + γ + δ) (1 + δ + β) (1 + α) , − ψ(λ(x)) = (2 + α + β) λ(x) + (1 + δ + β) (1 + α) (γ + 1) ;

2. the Dual Hahn polynomials

n, x, x + γ + δ + 1 Rn(λ(x); γ, δ, N) = 3F2 − − 1 , n = 0, 1,..., N, γ + 1, N ! − with 1 1 φ(λ(x)) = ( γ 1 + 2 N + δ) λ(x) + N (γ + 1) (1 + γ + δ) , ψ(λ(x)) = λ(x) + N (γ + 1) ; 2 − − 2 −

We get by direct computations that the action of the operators Dx and Sx on χn(γ,δ,λ(x)) is given by

2 χ1(γ,δ,λ(x)) Dx χn(γ,δ,λ(x)) = η(n)η(n 1) χn 1(γ,δ,λ(x)), − − 1 χ1(γ,δ,λ(x)) SxDx χn(γ,δ,λ(x)) = η(n) β( ,γ,δ, n 1) χn 1(γ,δ,λ(x)) + χn(γ,δ,λ(x)) , 2 − − !

χ1(γ,δ,λ(x)) χn(γ,δ,λ(x)) = ν(γ, δ, n) χn(γ,δ,λ(x)) + χn+1(γ,δ,λ(x)),

λ(x) χ (γ,δ,λ(x)) = µ(γ, δ, n) χ (γ,δ,λ(x)) χ + (γ,δ,λ(x)) n n − n 1 where

µ(γ, δ, n) = n(n + γ + δ + 1), ν(γ, δ, n) = n(n + γ + δ + 1), − n(2n + γ + δ + 2a) β(a,γ,δ, n) = − , η(n) = n. 2 − We set

pn(x):= pn(λ(x)) = kn χn(γ,δ,λ(x)) + kn′ χn 1(γ,δ,λ(x)) + kn′′ χn 2(γ,δ,λ(x)) + ..., − − use the latter structure relations satisfied by χn(γ,δ,λ(x)), and proceed as in section 2.1 to get λ = n((n 1)a + d)in(1) and the following result. n − − 7 Proposition 3. Let pn(x):= pn(λ(x)) = kn χn(γ,δ,λ(x)) + kn′ χn 1(γ,δ,λ(x)) + kn′′ χn 2(γ,δ,λ(x)) + − − ... (n N0) be a family of polynomial solutions of the divided-difference equation (1) (where φ(x) ∈φ(λ(x)) and ψ(x) ψ(λ(x))). Then the recurrence equation (6) (with x λ(x)) is valid with ← ← ←

kn An = 1, kn+1 − an (n 1) 2 an2 2 an + 4 dn + 2 b d + 2 bdn + n (2 n 1) d2 + de 2 ae kn − − − − − Bn =   , k + − (2 an 2 a + d) (2 an + d) n 1 − kn 1 n (an 2 a + d) 2 − = + + Cn − 2 (4 c ( 4 n 4) e) d kn+1 −4 (2 an a + d) (2 an 3 a + d) (2 an 2 a + d) × − − − − n + 8 (n 1)4 b + 4 (n 1)3 2 δ2 + 4 δγ + 2 γ2 3 n2 + 4 δ + 4 γ + 6 n 1 d + 16 c (n 1)2 a2 − − −  − −  −  + 4 (n 1)2 b2 16 (n 1)3 db + (n 1)2 5 δ2 + 10 δγ + 5 γ2 12 n2 + 10 δ + 10 γ + 24 n 7 d2 − − − − − − −    + (16 n 16) c 4 e (n 1)2 d + 4 e2 a + 4 (n 1)4 (n + δ + γ) ( n + 2 + δ + γ) a3 + ( 4 n + 4) db2 − − − − − −    + 8 (n 1)2 d2 4 de b + (n 1) ( 2 n + 3 + δ + γ) (2 n 1 + δ + γ) d3 . − − − − − −   o 2.4. Polynomials expanded in the basis B (α, x) { n } The following polynomial families are expanded in the basis Bn(α, x) : 1. the Askey-Wilson polynomials defined by { }

n n 1 iθ iθ (ab, ac, ad; q) q− , abcdq − , ae , ae− p (x; a, b, c, d q) = n φ q; q , x = cos θ, n | an 4 3 ab, ac, ad !

for which (q 1)2 φ(x) = − 2(abcd + 1)x2 (a + b + c + d + acd + abc + abd + bcd) x 4q3/2  − +ab + cd + bd + bc + ac + ad abcd 1 , − − (q 1)  ψ(x) = − 2 (abcd 1) x + a + b + c + d abc abd acd bcd) ; 2q − − − − −   2. the continuous dual q-Hahn polnomials

n iθ iθ (ab, ac; q) q− , ae , ae− p (x; a, b, c q) = n φ q; q , x = cos θ, n | an 3 2 ab, ac !

with (q 1)2 φ(x) = − 2x2 (a + b + c + abc) x + bc + ac + ab 1 , 4q3/2  − −  (q 1) ψ(x) = − 2x + a + b + c abc ; 2q  − −  8 3. the continuous q-Hahn polynomials

2iθˆ n n 1 i(θ+2θˆ) iθ (abe , ac, ad; q)n q− , abcdq − , ae , ae− pn(x; a, b, c, d; q) = 4φ3 q; q , x = cos(θ + θˆ), (aeiθˆ)n  abe2iθˆ, ac, ad      with

2 2 2 2 (q 1)2 d + bcd + at + abdt + abct + c + acd + bt φ(x) = − 2 (abcd + 1) x2 x 4q3/2 −  t   2 2 2 2 2 4 2 act + bdt abcdt + bct + cd t + abt + adt ˆ + − − , t = eiθ, t2  2 2 2 2 (q 1) c + d acd + bt + at bcd abct abdt ψ(x) = − 2 (abcd 1) x + − − − − ; 2q −  t    4. the Al-Salam-Chihara polynomials

n iθ iθ (ab; q) q− , ae , ae− , = n φ , = θ, Qn(x; a b q) n 3 2 q; q x cos | a ab, 0 ! with (q 1)2 (q 1) φ(x) = − 2x2 (b + a) x + ab 1 , ψ(x) = − 2x + b + a ; 4q3/2 2q  − −   −  5. the q-Meixner-Pollaczek polynomials

(a2; q) q n, aei(θ+2θˆ), ae iθ = n inθˆ n − − = + ˆ Pn(x; a q) a− e− 3φ2 2 q; q , x cos(θ θ), | (q; q)n  a , 0      with (t = eiθˆ)

2 2 2 (q 1) 2 a(1 + t ) 2 q 1 a(1 + t ) φ(x) = − 3 2x x + a 1 , ψ(x) = − 2x + ; 2 − t − 2q − t 4q     6. the continuous q-Jacobi polynomials

α+1 n n+α+β+1 α + 1 iθ α + 1 iθ (q ; q) q− , q , q 2 4 e , q 2 4 e− P(α,β)(x q) = n φ q; q , x = cos θ, n 4 3 α+1 α+β+1 α+β+2 | (q; q)  2 2  n  q , q , q   − −    with (p2 = q)

(p2 1)2 φ(x) = − 2(p2α+2β+4 + 1)x2 + √p(p + 1)(pα pβ)(pα+β+2 1)x 4p3  − − +p2α+2 + p2β+2 pα+β+1 pα+β+3 2pα+β+2 p2α+2β+4 1 , − − − − − p2 1  ψ(x) = − 2(p2α+2β+4 1)x + √p(p + 1)(pα pβ)(pα+β+2 + 1) ; 2p2  − −  9 7. the continuous q-ultraspherical/Rogers polynomials

2 n 2 n 1 iθ 1 iθ (β ; q)n n q− ,β q ,β 2 e ,β 2 e− = 2 = Cn(x; β q) β− 4φ3 1 1 q; q , x cos θ, | (q; q)n  βq 2 , β, βq 2   − −    with φ(x) = (q 1)2 2 β2q + 2 x2 (β + 1) (βq + 1) , ψ(x) = 4 (q 1) x β2q 1 √q; − − − −      8. the continuous big q-Hermite polynomials

n iθ iθ n q− , ae , ae− Hn(x; a q) = a− 3φ2 q; q , x = cos θ, | 0, 0 ! with 2 (q 1) 2 q 1 φ(x) = − 3 2x ax 1 , ψ(x) = − 2x + a ; 2 − − 2q − 4q     9. the continuous q-Laguerre polynomials

α+1 n α + 1 iθ α + 1 iθ (q ; q) q , q 2 4 e , q 2 4 e (α) = n − − = Pn (x q) 3φ2 α+1 q; q , x cos θ, | (q; q)n  q , 0      with   2 2 (p 1) 2 α+ 1 2α+2 φ(x) = − 2x p 2 (p + 1)x + p 1 , 4p3 − −   2 p 1 α+ 1 ψ(x) = − 2x + p 2 (p + 1) . 2p2 −   The procedure to find the coefficients of the recurrence equation (6) in terms of the coefficients a, b, c, d, e of φ(x) and ψ(x) is as in section 2.1: 1. Substitute

pn(x) = knBn(α, x) + kn′ Bn 1(α, x) + kn′′Bn 2(α, x) + ... (13) − − in the divided-difference equation (1). Next multiply this equation by B1(α, x) and use the relations [5]

2 B1(α, x)Dx Bn(α, x) = η(α, n)η(α √q, n 1)Bn 1(α, x), (14) − − B1(α, x)SxDxBn(α, x) = η(α, n) β1(α √q, n 1)Bn 1(α, x) + β2(n 1)Bn(α, x) , (15) − − − B1(α, x)Bn(α, x) = ν1(α, n)Bn(α, x) + ν2(n)Bn+1(α, x),  (16) with n 2α(1 q ) 1 2 2n 1 n η(α, n) = − , β (α, n) = (1 α q − )(1 q− ), q 1 1 2 − − − 1 1 n 2 n n β (n) = + , ν (α, n) = (1 q− )(1 α q ), ν (n) = q− . 2 2 2qn 1 − − 2 10 2 2. To eliminate the terms xBn(α, x) and x Bn(α, x), use the relations [5]

xBn(α, x) = µ1(α, n)Bn(α, x) + µ2(α, n)Bn+1(α, x), (17) 2 2 x Bn(α, x) = µ1(α, n)Bn(α, x) + µ2(α, n)(µ1(α, n) + µ1(α, n + 1))Bn+1(α, x)

+ µ2(α, n)µ2(α, n + 1)Bn+2(α, x), (18) with 1 + α2q2n 1 µ (α, n) = , µ (α, n) = − . 1 2αqn 2 2αqn

3. Equating the coefficients of Bn+1(α, x) gives

(qn 1) 2 √q (qn q) a + (q 1) (qn + q) d 1 − − − λn =  . (19) −2 qn (q 1)2 − n Equating the coefficients of Bn(α, x) and Bn 1(α, x) gives kn′ /kn, kn′′/kn Q(q , √q). − ∈ 4. Substitute the expression of pn given by (13) in the recurrence relation (6) and use (17). By equating the coefficients of Bn+1(α, x), Bn(α, x), Bn 1(α, x), we get An, Bn and Cn, respec- tively, given as −

kn 1 kn µ2(α, n 1)kn′ kn′+1 µ1(α, n) An = , Bn = − + , (20) kn+1 µ2(α, n) kn+1 − µ2(α, n)kn kn+1 − µ2(α, n) 2 kn 1 µ2(α, n 1)(kn′ ) µ2(α, n 2)kn′′ kn′′+1 kn′ kn′+1 (µ1(α, n) µ1(α, n 1))kn′ C − = + + . n − 2 − − − kn+1 − µ2(α, n)kn µ2(α, n)kn − kn+1 knkn+1 − µ2(α, n)kn

5. Substituting the values of kn′ and kn′′ given in step 3 in these equations yields the three un- n knowns in terms of α, a, b, c, d, e, n, kn 1, kn, kn+1 given by (N = q ): −

kn An = 2αN, kn+1 − kn 2 34 6 67 8 B = 2 N α 4 q (q + 1) (q 1) (N 1) (N q) b + 2 q 2 (q 1) (N + 1) (N + q) e a k n − − − − − n+1 n   67 7 33 8 2 2 2 2 2 q 2 (q + 1) (q 1) (N 1) (N + q) db + q (q 1) N q Nq N 2 Nq q N + q ed − − − − − − − − − 34 6 2 2 2 2 67 7 4  2 33 8 2 2  2 o 2 4 q (q 1) N 1 N q a + 4 q 2 (q 1) N q da + q (q 1) N + 1 N + q d . − − − − − − .n           o kn 1 The expression of − Cn is very huge and will not be displayed here. However, it can be found in kn+1 the Maple file associated to this manuscript at http://www.mathematik.uni-kassel.de/~tcheutia/. 2.5. Polynomials expanded in the basis ξ (γ, δ, µ(x)) { n } The polynomials represented in this basis are: 1. the q–Racah polynomials

n n+1 x x+1 q− , αβq , q− , γδq R (µ(x); α,β,γ,δ q) = φ q; q , n = 0, 1,..., N, n | 4 3 αq, βδq,γq !

11 with (q 1)2 φ(µ(x)) = − q2αβ + 1 µ(x)2 (qγδβ + qδ β α + qγ α + qβ α + γ + γ δ + δβ + α) µ(x) 2q3/2    − +2 qγ δ α + qδ β α + qγ α + qδ2βγ + qγ2δ + qγδβ γ δ q2αβ γ δ , − − (q  1)   ψ(µ(x)) = − q2αβ 1 µ(x) q (qγδβ + qδ β α + qγ α + qβ α γ γ δ δβ α) ; q − − − − − −     2. the dual q–Hahn polynomials

n x x+1 q− , q− , γδq Rn(µ(x); γ, δ, N q) = 3φ2 N q; q , n = 0, 1,..., N, | γq, q− !

with

N N (q 1)2 γ q + qNγ q + γ δ qNq + 1 γq γ δ q q + 1 + δ q δ φ(µ(x)) = − µ(x)2 µ(x) + 2 − , 2q3/2 qN  qN   −  (q 1) γ q + qNγ q + γ δ qNq + 1 ψ(µ(x)) = − µ(x) + − ; q − qN   3. the dual q–Krawtchouk polynomials

n x x N q− , q− , cq − Kn(µ(x); c, N q) = 3φ2 N q; q , n = 0, 1,..., N, | q− , 0 !

with (q 1)2 c + 1 1 qN q 1 c + 1 φ(µ(x)) = µ(x)2 µ(x) + 2c , ψ(µ(x)) = µ(x) + ; − 3 N −2N − N 2 − q q q − q 2q     By direct computations, we have the structure relations

2 ξ1(γ, δ, µ(x))Dxξn(γ, δ, µ(x)) = η(1, n)η( √q, n 1)ξn 1(γ, δ, µ(x)); − − ξ1(γ, δ, µ(x))SxDxξn(γ, δ, µ(x)) = η(1, n) β1( √q,γ,δ, n 1)ξn 1(γ, δ, µ(x)) + β2(n 1)ξn(γ, δ, µ(x)) ; − − − ξ1(γ, δ, µ(x))ξn(γ, δ, µ(x)) = ν1(γ, δ,n)ξn(γ, δ, µ(x)) + ν2(n)ξn+1(γ, δ, µ(x)); 

µ(x)ξn(γ, δ, µ(x)) = µ1(γ, δ, n)ξn(γ, δ, µ(x)) + µ2(n)ξn+1(γ, δ, µ(x)); where

2n+1 1 + γδq 1 n n+1 µ (γ, δ, n) = , µ (n) = − , ν (γ, δ, n) = (1 q− )(1 γδq ), 1 qn 2 qn 1 − − n n n 1 2 2n n 1 + q a(1 q ) ν (n) = q− , β (a,γ,δ, n) = (1 a γδq )(1 q− ), β (n) = , η(a, n) = − . 2 1 2 − − 2 2qn q 1 − 12 We suppose now that

pn(x):= pn(µ(x)) = knξn(γ, δ, µ(x)) + kn′ ξn 1(γ, δ, µ(x)) + kn′′ξn 2(γ, δ, µ(x)) + .... − −

To get the coefficients An, Bn and Cn of (6), we proceed as in section 2.4 and obtain λn given by (19) and for N = qn,

kn An = N, kn+1 − k n B = 4 N2q4 (q + 1) (q 1)2 (N 1) (N q) b + 2 N2q7/2 (q 1)4 (N + 1) (N + q) e a k n − − − − − n+1 n   2 N2q7/2 (q + 1) (q 1)3 (N 1) (N + q) db + N2q3 (q 1)4 N2q Nq2 N2 2 Nq q2 N + q ed − − − −  − − − − −  o 4 q4 N2 1 N2 q2 (q 1)2 a2 + 4 q7/2 (q 1)3 N4 q2 da + q3 (q 1)4 N2 + 1 N2 + q2 d2 . .n  −   −  − −  −  −     o kn 1 As in section 2.4, the coefficients − Cn is huge and can be found in the Maple file associated to kn+1 this manuscript at http://www.mathematik.uni-kassel.de/~tcheutia/.

3. Extension of the algorithms implemented in the Maple package retode As shown in section 2, the classical orthogonal polynomials on a quadratic or a q-quadratic lattice satisfy a recurrence equation

pn(x) = (An x + Bn)pn(x) Cn pn 1(x), − − with An, Bn, Cn given explicitly. Koepf and Schmersau [8] implemented algorithms to test wether or not a given holonomic recurrence equation (i. e. linear, homogeneous with polynomial coeffi- cients)

q (x)p + (x) + r (x)p + (x) + s (x)p (x) = 0 (q (x), r (x), s (x) Q[n, x]), (21) n n 2 n n 1 n n n n n ∈ has classical orthogonal polynomial solutions of a continuous, a discrete or a q-discrete variable. In fact, it is less obvious to find out whether there is a polynomial system satisfying (21), being a linear transform of one of the classical system (of a continuous, a discrete or a q-discrete variable), and to identify the system in the affirmative case. In this section, we aim to implement, using the same approach, algorithms to test wether a given holonomic recurrence equation has classical orthogonal polynomial solutions of a quadratic or a q-quadratic lattice. The algorithms were ex- plicitly given and explained in [8] for classical orthogonal polynomials of a continuous, a discrete or a q-discrete variable and we will adapt them here for classical orthogonal polynomials on a quadratic or a q-quadratic lattice according to the basis in which the polynomials are expanded.

3.1. Polynomials expanded in the basis ϑ (α, x) { n } Algorithm 1 (see [8, Algorithms 1 and 2]). This algorithm decides whether a given holonomic three-term recurrence equation has classical orthogonal polynomial solutions expanded in the basis ϑ (α, x) , and returns their data if applicable. { n } 13 1. Input: A holonomic three-term recurrence equation

q (x)p + (x) + r (x)p + (x) + s (x)p (x) = 0 (q (x), r (x), s (x) Q[n, x]). n n 2 n n 1 n n n n n ∈

2. Shift: Shift by max n N0 n is zero of either qn 1(x) or sn(x) + 1 if necessary. { ∈ | − } 3. Rewriting: Rewrite the recurrence equation in the form

pn+1(x) = tn(x)pn(x) + un(x)pn 1(x) (tn(x), un(x) Q(n, x)). − ∈

If either tn(x) is not a polynomial of degree one in x or un(x) is not a constant with respect to x, return “no classical orthogonal polynomial solution exists”; exit. 4. Linear transformation: Rewrite the recurrence equation by the linear transformation x (x g)/ f with unknowns f and g. 7→ − 5. Standardization: Given now An, Bn and Cn by

pn+1(x) = (An x + Bn)pn(x) Cn pn 1(x) (An, Bn, Cn Q(n), An , 0), − − ∈ define kn+1 vn := An = (vn, wn Q[n]) kn wn ∈ according to proposition 1. 6. Make monic: Set Bn Cn B˜ n := Q(n) and C˜n := Q(n) An ∈ AnAn 1 ∈ − and bring these rational functions in lowest terms. If the degree of either the numerator B˜ n is larger than 4, if the degree of the denominator of B˜ n is larger than 2, if the degree of the numerator of C˜n is larger than 8, or if the degree of the denominator of C˜n is larger than 4, then return “no classical orthogonal polynomial solution exists”. 7. Polynomial identities: Set

kn kn 1 B˜ n = Bn, C˜n = − Cn kn+1 kn+1 according to proposition 1, in terms of the unknowns a, b, c, d, e, f and g. Multiply these identities by their common denominators, and bring them therefore in polynomial form. 8. Equating coefficients: Equate the coefficients of the powers of n in the two resulting equations. This results in a nonlinear system in the unknowns a, b, c, d, e, f and g. Solve this system by Gr¨obner bases methods. If the system has no solution or only one with a = d = 0, then return ‘no classical orthogonal polynomial solution exists”; exit. 9. Output: Return the solution vectors (a, b, c, d, f, g) of the last step, the divided-difference equation (3) together with the information kn+1 and y = f x + g. kn

14 Example 4. For the first example, we consider the three-term recurrence equation satisfied by the Wilson polynomials

2 2 2 Wn(x ; a, b, c, d) W˜ n(x ):= W˜ n(x ; a, b, c, d) = (a + b)n(a + c)n(a + d)n given by [9, eq. (9.1.4)]

2 2 2 2 2 2 (a + x )W˜ n(x ) = AnW˜ n+1(x ) (An + Cn)W˜ n(x ) + CnW˜ n 1(x ), − − − where (n + a + b + c + d 1) (n + a + b) (n + a + c) (n + a + d) A = − , n (2 n + a + b + c + d 1) (2 n + a + b + c + d) n (n + b + c 1) (n + b +−d 1) (n + c + d 1) C = − − − . n (2 n + a + b + c + d 2) (2 n + a + b + c + d 1) − − Using our implementation, the result is obtained by > A[n]:=(n+a+b+c+d-1)*(n+a+b)*(n+a+c)*(n+a+d)/((2*n+a+b+c+d-1)*(2*n+a+b+c+d)) (n + a + b + c + d 1) (n + a + b) (n + a + c) (n + a + d) A := − n (2 n + a + b + c + d 1) (2 n + a + b + c + d) − > C[n]:=n*(n+b+c-1)*(n+b+d-1)*(n+c+d-1)/((2*n+a+b+c+d-2)*(2*n+a+b+c+d-1)) n (n + b + c 1) (n + b + d 1) (n + c + d 1) C := − − − n (2 n + a + b + c + d 2) (2 n + a + b + c + d 1) − − > RecWilson:= -(a^2+x)*p(n)=A[n]*p(n+1)-(A[n]+C[n])*p(n)+C[n]*p(n-1): > strict:=true: > REtoWilsonDE(subs(n=n+1, RecWilson),p(n),x) ‘Warning: parameters have the values‘, a = a, b = a (ab + ac + ad + cb + bd + cd) , − n c = a2bcd, d = a2 + ab + ac + ad, e = a2bc a2bd a2cd abcd − − − − o abcd abx acx adx cbx bdx cdx + x2 DD (DD (p (n, x) , x) , x) − − − − − − h  (abc + abd + acd + bcd ax bx cx dx) SS (DD (p (n, x) , x) , x) − − − − − n (n + a + b + c + d 1) p (n, x) = 0, − − k + (2 n + a + b + c + d 1) (2 n + a + b + c + d) n 1 = − kn −(n + a + b + c + d 1) (n + a + b) (n + a + c) (n + a + d) which gives the divided-difference equation− of the Wilson polynomials (see [13,i theo. 2.5]), as well as the term ratio kn+1/kn. Here SS and DD stand for Sx and Dx, respectively. Example 5. Abdulaziz D. Alhaidari [1] encountered two families of orthogonal polynomials on the real line defined by their three-term recurrence relations and initial values. The first system is

15 given by

µ + ν + 1 2 ν2 µ2 cos θH(µ,ν)(z; α, θ) = z sin θ n + + α + − H(µ,ν)(z; α, θ) n   2 !  (2n + µ + ν)(2n + µ + ν + 2) n     2(n + µ)(n + ν)  (µ,ν)  2(n + 1)(n + µ + ν + 1) (µ,ν ) + Hn 1 (z; α, θ) + Hn+1 (z; α, θ), (2n + µ + ν)(2n + µ + ν + 1) − (2n + µ + ν + 1)(2n + µ + ν + 2) (22)

(µ,ν) (µ,ν) with 0 θ π, µ, ν > 1, α R and initial values H0 (z; α, θ) = 1,H 1 (z; α, θ) = 0. The second≤ ≤ system is − ∈ −

µ2 ν2 2n(n + ν) (µ + 1)2 zG(µ,ν)(z; σ) = (σ + B2) − + 1 G(µ,ν)(z; σ) n n "(2n + µ + ν)(2n + µ + ν + 2) # − 2n + µ + ν − 2 ! n

2 2(n + µ)(n + ν) (µ,ν) (σ + Bn 1) Gn 1 (z; σ) − − (2n + µ + ν)(2n + µ + ν + 1) − 2(n + 1)(n + µ + ν + 1) (σ + B2) G(µ,ν)(z; σ), (23) − n (2n + µ + ν + 1)(2n + µ + ν + 2) n+1

µ+ν (µ,ν) (µ,ν) with Bn = n + 1 + 2 , µ, ν > 1 and σ R and initial values G0 (z; σ) = 1,G 1 (z; σ) = 0. − ∈ − Our implementation with > BB:=n->n+1+(mu+nu)/2: > recOpen2:=z*p(n)=((sigma+BB(n)^2)*((mu^2-nu^2)/((2*n+mu+nu)*(2*n+mu+nu+2))+1) > -2*n*(n+nu)/(2*n+mu+nu)-(mu+1)^2/2)*p(n)-(sigma+BB(n-1)^2)*2*(n+mu)*(n+nu) > /((2*n+mu+nu)*(2*n+mu+nu+1))*p(n-1) > -(sigma+BB(n)^2)*2*(n+1)*(n+mu+nu+1)/((2*n+mu+nu+1)*(2*n+mu+nu+2))*p(n+1): > strict:=false: > REtoWilsonDE(subs(n=n+1, recOpen2),p(n),z) returns six divided-difference equations (see the Maple file associated to this manuscript) for the second recurrence equation (23):

1 z2 + µ2 2 σ 3 z + (µ 1)2 µ2 + 2 µ + 4 σ + 1 D2P (z/2) 4 z n  − −  −  ! + (4 z + 2 (µ 1) (µ + 2 σ + 1))S D P (z/2) 4n(n + 1)P (z/2) = 0, (24) − z z n − n

1 z2 + µ2 + 2 µ 2 σ + 1 z + (µ + 1)2 µ2 + 2 µ + 4 σ + 1 D2P (z/2) − 4 z n    ! 4 σ (µ + 1) S D P (z/2) 4n(n 1)P (z/2) = 0, (25) − z z n − − n

16 1 a2z2 + µ2 + 2 µ 2 σ + 1 a2 d (µ + 1) a d2 z − − − 2    ! 1 + (µ + 1)2 µ2 + 2 µ + 4 σ + 1 a2 2 d (µ + 1) a + d2 D2P (z/2) 4 − z n     + 2 adz (µ + 1) 4 a2σ d (µ + 1) a + d2 S D P (z/2) − − z z n 4 na((n 1)a + d)P (z/2) = 0 (a , 0, d ,0), (26) − − n

1 1 ((4 ν + 1) z ν2)D2P (2z) + (ν2 + ν 2z)S D P (2z) + nP (2z) = 0 (ν , ), (27) − 2 z n − z z n n −4 with σ = 0, µ = ν 1, − 1 1 3 (4 ν + 3) z ν (ν + 1) D2P (2z) + (ν2 + 2ν 2z + )S D P (2z) + nP (2z) = 0 (ν , ), − 2 ! z n − 2 z z n n −4 (28) with σ = 1 , µ = ν, − 4 1 5 (4 ν + 5) z (ν + 1)2 D2P (2z) + (ν2 + 3ν 2z + 2)S D P (2z) + nP (2z) = 0 (ν , ), − 2 ! z n − z z n n −4 (29) with σ = 0, µ = ν + 1. By comparison with the Wilson divided-difference equation, we deduce from the first three divided-difference equations (24)–(26) that

G(µ,ν)(z; σ) = constant W (z/2; a, b, c, d) n × n 1 + 1 + 1 + + 1 + where a, b, c, d are permutations of elements of the set 2 ( µ 1), 2 ( µ 1), 2 (µ 1) √ σ, 2 (µ 1 1 1 1 { − − 1 1 −1 1) √ σ , 2 (µ + 1), 2 (µ + 1), 2 (µ + 1) + √ σ, 2 (µ + 1) √ σ , 2 (µ + 1), 2 (µ + 1), 2 (δ µ − − } 1{ − − − − − } { − − 1) + √ σ, 2 (δ µ 1) √ σ for the first equation (24), the second equation (25), and the third equation− (26) in− which− the− parameters− } a = 1, d = δ, respectively. This brings then a new parameter (µ,ν) δ in the definition of the polynomial Gn (z; σ) and we also remark that for d = 0 and a = 1 in the third equation (26), we recovered the second equation (25). For the value d = δ = n + µ + 2, we recover (from the identification of (26) with the Wilson polynomials) the solution

(µ,ν) Wn(z/2; a, b, c, d) Gn (z; σ) = (a + b)n(a + d)n

µ+1 n+1 n+1 given in [2] where a = c = 2 , b = 2 + √ σ and d = 2 √ σ. Comparing the last three equations (27)–(29−) with the divided-di− −fference equation of the continu- ous dual Hahn polynomials S n(2z; a, b, c), we deduce that

(ν 1,ν) G − (z; 0) = constant S (2z; a, b, c), n × n 17 1 1 1 with a = c = ν, b = 2 , or a = b = ν, c = 2 or b = c = ν, a = 2 , i. e., a, b, c are permutations of elements of the set ν, ν, 1 ; { 2 } G(ν,ν)(z; 1/4) = constant S (2z; a, b, c), n − × n where a, b, c are permutations of elements of the set ν + 1, ν, 1 ; { 2 } G(ν+1,ν)(z; 0) = constant S (2z; a, b, c), n × n where a, b, c are permutations of the elements of the set ν + 1,ν + 1, 1 . { 2 } 3.2. Polynomials expanded in the basis (α + ix) { n} The steps of the algorithm in this case agree with those given in section 3.1. In steps 5 and 7, we use proposition 2 whereas in step 6, the algorithm will return “no classical orthogonal polynomial solution exists” if the degree of either the numerator or the denominator of B˜ n is larger than 2, if the degree of the numerator of C˜n is larger than 7, or if the degree of the denominator of C˜n is larger than 5. Example 6. As example here, starting from the three-term recurrence equations (RE) [9, eq. (9.4.3)] and [9, eq. (9.7.3)] satisfied by the continuous Hahn and the Meixner-Pollaczek polyno- mials, respectively, and using our implementation with REtoContHahnDE(subs(n=n+1, RE), p(n), x), we recover the divided-difference equations of type (4) satisfied by both families (see [17, prop. 4]). In the output in this case, SS and DD stand for Sx and δx, respectively.

3.3. Polynomials expanded in the basis χ (γ,δ,λ(x)) { n } We proceed as in the algorithm of section 3.1. Here, in steps 5 and 7, we use proposi- tion 3 whereas in step 6, the algorithm will return “no classical orthogonal polynomial solution exists” if the degree of either the numerator of B˜ n is larger than 4, the degree of the denominator of B˜ n is larger than 2, if the degree of the numerator of C˜n is larger than 8, or if the degree of the denominator of C˜n is larger than 4. Example 7. If we call RE the three-term recurrence equation of the Racah or the dual Hahn poly- nomials given, respectively, by [9, eq. (9.2.3)] and [9, eq. (9.6.3)], then with our implementation REtoRacahDE(subs(n=n+1, RE), p(n),x), we get the divided-difference equation satisfied by both families with φ and ψ given as in section 2.3. Remark 8. From our implementations of sections 3.1. 3.2 and 3.3, we get for the recurrence equation (22) the following: > RE:=1/2*(y+y^(-1))*p(n)=(z/(2*I)*(y-y^(-1))*((n+(mu+nu+1)/2)^2+alpha)+ (nu^2-mu^2)/((2*n+mu+nu)*(2*n+mu+nu+2)))*p(n) > +2*(n+mu)*(n+nu)/((2*n+mu+nu)*(2*n+mu+nu+1))*p(n-1) > +2*(n+1)*(n+mu+nu+1)/((2*n+mu+nu+1)*(2*n+mu+nu+2))*p(n+1): > strict:=false: > REtoWilsonDE(subs(n=n+1, RE), p(n), z) ‘Warning: parameters have the values‘, a = a, α = α, b = b, c = c, d = d, { } 18 e = e, f = 0, g = g, µ = µ, ν = ν, y = 1 { } ‘Warning: parameters have the values‘, a = a, α = α, b = b, c = c, d = d, { } e = e, f = 0, g = g, µ = µ, ν = ν, y = 1 { } (dg + e) SS (DD (p (n, g) , z) , z) n (an a + d) p (n, g) [[DD (DD (p (n, g) , z) , z) + − = 0], ] ag2 + bg + c − ag2 + bg + c We get the same answer using > REtoRacahDE(subs(n=n+1, RE),p(n),z) and > REtoContHahnDE(subs(n=n+1, RE),p(n),z) (µ,ν) We deduce from our implementations (which return the solution Hn (z; α, θ) = 0) that the polyno- (µ,ν) mial family Hn (z; α, θ) satisfying the recurrence equation (22) is not related to a known classical orthogonal polynomial sequence on a quadratic lattice expanded in the basis ϑ (α, x) , (α+ix) { n } { n} or χn(γ,δ,λ(x)) . This recurrence equation may lead to a new family of orthogonal polynomial sequence.{ }

3.4. Polynomials expanded in the basis B (α, x) { n } Algorithm 2 (see [8, Algorithm 3]). This algorithm decides whether a given holonomic three- term recurrence equation has classical orthogonal polynomial solutions expanded in the basis B (α, x) , and returns their data if applicable. { n } 1. Input: A holonomic three-term recurrence equation

n q (x)p + (x) + r (x)p + (x) + s (x)p (x) = 0 q (x), r (x), s (x) Q[q , √q, x] . n n 2 n n 1 n n n n n ∈  2. Shift: Shift by max n N0 n is zero of either qn 1(x) or sn(x) + 1 if necessary. { ∈ | − } 3. Rewriting: Rewrite the recurrence equation in the form

n pn+1(x) = tn(x)pn(x) + un(x)pn 1(x) tn(x), un(x) Q(q , √q, x) . − ∈  If either tn(x) is not a polynomial of degree one in x or un(x) is not a constant with respect to x, return “no classical orthogonal polynomial solution exists”; exit. 4. Linear transformation: Rewrite the recurrence equation by the linear transformation x (x g)/ f with unknowns f and g. 7→ − 5. Standardization: Given now An, Bn and Cn by

n pn+1(x) = (An x + Bn)pn(x) Cn pn 1(x) (An, Bn, Cn Q(q , q), An , 0) , − − ∈ define k 1 v n+1 = = n , Q n, . : n An (vn wn [q q]) kn −2αq wn ∈ 6. Make monic: Set

Bn n Cn n B˜ n := Q(q , √q) and C˜n := Q(q , √q) An ∈ AnAn 1 ∈ 19 − and bring these rational functions in lowest terms. If the degree (w. r. t. N := qn) of either the numerator B˜ n is larger than 3, if the degree of the denominator of B˜ n is larger than 4, if the degree of the numerator or the denominator of C˜n is larger than 14, then return “no classical orthogonal polynomial solution exists”. 7. Polynomial identities: Set

kn kn 1 B˜ n = Bn, C˜n = − Cn kn+1 kn+1 in terms of the unknowns a, b, c, d, e, f and g. Multiply these identities by their common denominators, and bring them therefore in polynomial form. 8. Equating coefficients: Equate the coefficients of the powers of N = qn in the two resulting equations. This results in a nonlinear system in the unknowns a, b, c, d, e, f and g. Solve this system by Gr¨obner bases methods. If the system has no solution or only one with a = d = 0, then return ‘no classical orthogonal polynomial solution exists”; exit. 9. Output: Return the solution vectors (a, b, c, d, f, g) of the last step, the divided-difference equation (1) together with the information kn+1 and y = f x + g. kn Example 9. As illustrative example, we use our implementation to find the divided-difference equation of type (1) satisfied by the continuous Hermite polynomials. > recContinuousqHermite:=2*x*p(n)=p(n+1)+(1-q^n)*p(n-1) recContinuousqHermite := 2 xp (n) = p (n + 1) + (1 qn) p (n 1) − − > strict:=true: > REtoAskeyWilsonDE(subs(n=n+1, recContinuousqHermite), p(n),q, x) xSS (DD (p (n, x) , x) , x) √q [1/2 2 x2 1 DD (DD (p (n, x) , x) , x) 2 − − q 1   − q3/2 ( 1 + qn) p (n, x) k + = n+1 = 2 − 2 0, 2] qn (q 1) kn − In the result, SS and DD stand for Sx and Dx, respectively. The results for the other families can be found in the accompanying Maple file of this manuscript.

3.5. Polynomials expanded in the basis ξ (γ, δ, µ(x)) { n } The steps of the algorithm in this case agree with those given in section 3.4. In steps 5 and 7, we use the results from section 2.5 whereas in step 6, the algorithm will return “no classical orthogonal polynomial solution exists” if the degree of either the numerator of B˜ n is larger than 3, if the denominator of B˜ n is larger than 4, if the degree of the numerator or the denominator of C˜n is larger than 12. Example 10. If we consider for example the recurrence equation RE for the q-Racah, dual q- Hahn, dual q-Krawtchouk given, respectively, by [9, eq. (14.2.3)], [9, eq. (14.7.3)], [9, eq. (14.17.3)], we use our implementation REtoqRacahDE(subs(n=n+1,RE), p(n), x, q) to get the divided-difference equations satisfied by the three families of polynomials and the product γδ. 20 Note: The Maple implementation retode by Koepf and Schmersau has been updated with our extension to classical orthogonal polynomials on a quadraticora q-quadratic lattice. The package retode.mpl and a worksheet retodedemo.mw containing the three-term recurrence equations of section 2 and the examples for all the classical orthogonal polynomials on a quadratic or a q- quadratic lattice can be obtained from http://www.mathematik.uni-kassel.de/~tcheutia/.

4. Acknowledgments This work has been supported by the Institute of Mathematics of the University of Kassel, Germany. The author thanks Wolfram Koepf for bringing his attention to this problem and for helpful discussions to improve his Maple implementation.

References References [1] A.D. Alhaidari, Open problem in orthogonal polynomials, arXiv:math-ph/1709.06081v1 [2] P. Clarkson, W. Van Assche, Open problems OPSFA-14, to appear [3] S. Cooper, The Askey-Wilson operator and the 6φ5 summation formula, Preprint, 2012. [4] M. Foupouagnigni, On difference equations for orthogonal polynomials on non-uniform lattices, J. Difference Equ. Appl., 14 (2008) 127-174. [5] M., Foupouagnigni, W. Koepf, D.D. Tcheutia, Connection and linearization coefficients of the Askey-Wilson polynomials, J. Symbolic Comput. 53 (2013) 96-118. [6] M.E.H. Ismail, D. Stanton, Some combinatorial and analytical identities, Ann. Comb. 16 (2012) 755-771. [7] W. Koepf, D. Schmersau, Representations of orthogonal polynomials, J. Comput. Appl. Math. 90 (1998) 57–94. [8] W. Koepf, D. Schmersau, Recurrence equations and their classical orthogonal polynomial solutions, Appl. Math. Comput. 128 (2002) 303–327. [9] R. Koekoek, P.A. Lesky, R.F. Swarttouw, Hypergeometric Orthogonal Polynomials and Their q-Analogues, Springer Monographs in Mathematics, Springer-Verlag, Berlin, 2010. [10] T.H. Koornwinder, R. Swarttouw, rec2ortho: an algorithm for identifying orthog- onal polynomials given by their three-term recurrence relation as special functions, http://turing.wins.uva.nl/~thk/recentpapers/rec2ortho.html, 1996–1998. [11] A.P. Magnus, Special nonuniform lattice (snul) orthogonal polynomials on discrete dense sets of points, J. Comput. Appl. Math. 65 (1995) 253-265. [12] P. Njionou Sadjang, Moments of classical orthogonal polynomials, Ph.D. dissertation, Universit¨at Kassel, 2013. Available at: https://kobra.bibliothek.uni-kassel.de/handle/urn:nbn:de:hebis:34-2013102244291 [13] P. Njionou Sadjang, W. Koepf, M. Foupouagnigni, On structure formulas for Wilson polynomials, Int. Transf. Spec. Funct. 26 (2015) 1000-1014. [14] P. Njionou Sadjang, W. Koepf, M. Foupouagnigni, On moments of classical orthogonal polynomials, J. Math. Anal. Appl. 424 (2015) 122–151. [15] F.W.J. Olver, D.W. Lozier, R.F. Boisvert, C.W. Clark, NIST Handbook of Mathematical Functions, National Institute of Standards and Technology U.S. Department of Commerce and Cambridge University Press, 2010. [16] D.D. Tcheutia, On Connection, Linearization and Duplication Coefficients of Classical Orthogonal Polynomials, Ph.D. dissertation, Universit¨at Kassel, 2014. Available at: https://kobra.bibliothek.uni- kassel.de/handle/urn:nbn:de:hebis:34-2014071645714 [17] D.D. Tcheutia, P. Njionou Sadjang, W. Koepf, M. Foupouagnigni, Divided–difference equation, inversion, con- nection, multiplication and linearization formulae of the continuous Hahn and the Meixner–Pollaczek polyno- mials, Ramanujan J. 45 (2017) 33–56. [18] M.V.Tratnik, Multivariable Meixner, Krawtchouk, and Meixner-Pollaczek polynomials,J. Math. Phys.30 (1989) 2740-2749. 21