genfunc
rgf_charseq
find characteristic sequence of a rational generating function
Calling Sequence
Parameters
Description
Examples
rgf_charseq(Fz, z, Fn, n)
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
This command returns the characteristic sequence of Fz as a function of Fn.
The characteristic generating function Cz of Fz is defined as:
dz≔denomFz
Cz≔tcoeffdz,zzldegreedz,zdz
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.
withgenfunc:
rgf_charseqz1−z−z2,z,Fn,n
Fn+1
rgf_charseq1+2z1−3z−4z2,z,tn,n
tn3+4tn−13
Gy≔1+y+y21−y3:
rgf_expandGy,y,j
−3j−2+3j+1j2+1
rgf_charseqGy,y,,j
−j−53+8j+1j2+13+j−1j3−7jj2+123
factor
j+2j+12
rgf_encode,j,z
11−z+3z21−z2+z11−z2+2z1−z32
normal
−1z−13
See Also
denom
genfunc/rgf_encode
genfunc/rgf_expand
genfunc[termscale]
ldegree
tcoeff
Download Help Document