genfunc - Maple Programming Help

Home : Support : Online Help : Mathematics : Algebra : Rational Expressions : Rational Generating Functions : genfunc/rgf_charseq

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