rgf_charseq - Maple Help

genfunc

 rgf_charseq
 find characteristic sequence of a rational generating function

 Calling Sequence rgf_charseq(Fz, z, Fn, n)

Parameters

 Fz - rational generating function z - name, generating function variable Fn - expression for nth term of the sequence encoded by Fz n - name, index variable for Fn

Description

 • This command returns the characteristic sequence of Fz as a function of Fn.
 • The characteristic generating function Cz of Fz is defined as:

$\mathrm{dz}≔\mathrm{denom}\left(\mathrm{Fz}\right)$

$\mathrm{Cz}≔\frac{\mathrm{tcoeff}\left(\mathrm{dz},z\right){z}^{\mathrm{ldegree}\left(\mathrm{dz},z\right)}}{\mathrm{dz}}$

 The sequence encoded by Cz is the characteristic sequence of Fz.
 • The value FAIL is returned if Fz is a trivial rational generating function.
 • The command with(genfunc,rgf_charseq) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{genfunc}\right):$
 > $\mathrm{rgf_charseq}\left(\frac{z}{1-z-{z}^{2}},z,F\left(n\right),n\right)$
 ${F}{}\left({n}{+}{1}\right)$ (1)
 > $\mathrm{rgf_charseq}\left(\frac{1+2z}{1-3z-4{z}^{2}},z,t\left(n\right),n\right)$
 $\frac{{t}{}\left({n}\right)}{{3}}{+}\frac{{4}{}{t}{}\left({n}{-}{1}\right)}{{3}}$ (2)
 > $\mathrm{Gy}≔\frac{1+y+{y}^{2}}{{\left(1-y\right)}^{3}}:$
 > $\mathrm{rgf_expand}\left(\mathrm{Gy},y,j\right)$
 ${-}{2}{-}{3}{}{j}{+}{3}{}\left({j}{+}{1}\right){}\left(\frac{{j}}{{2}}{+}{1}\right)$ (3)
 > $\mathrm{rgf_charseq}\left(\mathrm{Gy},y,,j\right)$
 ${-}\frac{{5}}{{3}}{-}{j}{+}\frac{{8}{}\left({j}{+}{1}\right){}\left(\frac{{j}}{{2}}{+}{1}\right)}{{3}}{+}\frac{\left({j}{-}{1}\right){}{j}}{{3}}{-}\frac{{7}{}{j}{}\left(\frac{{j}}{{2}}{+}\frac{{1}}{{2}}\right)}{{3}}$ (4)
 > $\mathrm{factor}\left(\right)$
 $\frac{\left({j}{+}{2}\right){}\left({j}{+}{1}\right)}{{2}}$ (5)
 > $\mathrm{rgf_encode}\left(,j,z\right)$
 $\frac{{1}}{{1}{-}{z}}{+}\frac{{3}{}{z}}{{2}{}{\left({1}{-}{z}\right)}^{{2}}}{+}\frac{{z}{}\left(\frac{{1}}{{\left({1}{-}{z}\right)}^{{2}}}{+}\frac{{2}{}{z}}{{\left({1}{-}{z}\right)}^{{3}}}\right)}{{2}}$ (6)
 > $\mathrm{normal}\left(\right)$
 ${-}\frac{{1}}{{\left({z}{-}{1}\right)}^{{3}}}$ (7)