 poltorec - Maple Help

gfun

 poltorec
 determine the recurrence satisfied by a polynomial in holonomic sequences Calling Sequence poltorec(P, listrec, list_unknowns, u(n)) Parameters

 P - polynomial in n and u1(n), u2(n), ... and possibly their shifts (u1(n+1), u2(n+1), ...) and repeated shifts listrec - list containing, for each of u1(n), u2(n), ..., either a linear recurrence equation it satisfies or a set containing the equation together with initial conditions list_unknowns - list of sequences $[\mathrm{u1}\left(n\right),\mathrm{u2}\left(n\right),...]$ u - name; holonomic sequence name n - name; variable of the holonomic sequence u Description

 • The poltorec(P, listrec, list_unknowns, u(n)) command returns the recurrence satisfied by the polynomial P.
 If $\mathrm{u1}\left(n\right)$, $\mathrm{u2}\left(n\right)$, ... are holonomic sequence solutions of listrec, listrec, ..., the poltorec function returns a linear recurrence equation satisfied by $P\left(n,\mathrm{u1}\left(n\right),...\right)$. Examples

 > $\mathrm{with}\left(\mathrm{gfun}\right):$
 > $\mathrm{rec1}≔\left\{\mathrm{u1}\left(0\right)=1,\mathrm{u1}\left(n+1\right)=\left(n+1\right)\mathrm{u1}\left(n\right)\right\}:$
 > $\mathrm{rec2}≔\left\{\mathrm{u2}\left(0\right)=1,\mathrm{u2}\left(1\right)=1,\mathrm{u2}\left(n+2\right)=2\mathrm{u2}\left(n+1\right)-3n\mathrm{u2}\left(n\right)\right\}:$
 > $\mathrm{poltorec}\left({\mathrm{u1}\left(n\right)}^{2}+2\mathrm{u1}\left(n\right)\mathrm{u2}\left(n\right),\left[\mathrm{rec1},\mathrm{rec2}\right],\left[\mathrm{u1}\left(n\right),\mathrm{u2}\left(n\right)\right],u\left(n\right)\right)$
 $\left\{\left({-}{3}{}{{n}}^{{7}}{-}{39}{}{{n}}^{{6}}{-}{192}{}{{n}}^{{5}}{-}{462}{}{{n}}^{{4}}{-}{579}{}{{n}}^{{3}}{-}{363}{}{{n}}^{{2}}{-}{90}{}{n}\right){}{u}{}\left({n}\right){+}\left({5}{}{{n}}^{{5}}{+}{54}{}{{n}}^{{4}}{+}{209}{}{{n}}^{{3}}{+}{354}{}{{n}}^{{2}}{+}{254}{}{n}{+}{60}\right){}{u}{}\left({n}{+}{1}\right){+}\left({-}{{n}}^{{4}}{-}{12}{}{{n}}^{{3}}{-}{46}{}{{n}}^{{2}}{-}{62}{}{n}{-}{15}\right){}{u}{}\left({n}{+}{2}\right){+}\left({{n}}^{{2}}{+}{4}{}{n}\right){}{u}{}\left({n}{+}{3}\right){,}{u}{}\left({0}\right){=}{3}{,}{u}{}\left({1}\right){=}{3}{,}{u}{}\left({2}\right){=}{12}{,}{u}{}\left({3}\right){=}{48}\right\}$ (1)

Cassini's identity:

 > $\mathrm{fib}≔\left\{F\left(0\right)=1,F\left(1\right)=1,F\left(n+2\right)=F\left(n+1\right)+F\left(n\right)\right\}:$
 > $\mathrm{poltorec}\left(F\left(n+2\right)F\left(n\right)-{F\left(n+1\right)}^{2},\left[\mathrm{fib}\right],\left[F\left(n\right)\right],f\left(n\right)\right)$
 $\left\{{f}{}\left({n}{+}{1}\right){+}{f}{}\left({n}\right){,}{f}{}\left({0}\right){=}{1}\right\}$ (2)