genfunc
rgf_expand
expand rational generating functions
Calling Sequence
Parameters
Description
Examples
rgf_expand(Fz, z, n)
Fz
-
rational generating function of z
z
name, the generating function variable
n
name, the index variable for the expansion of Fz
The function finds the closed form expansion of the nth term in the sequence encoded by the rational generating function Fz.
If the denominator of Fz has polynomial factors of degree greater than two that cannot be factored over the rationals, an inert Sum expression involving RootOf values is returned.
The global variables _J and _R are used in the RootOf expressions.
The command with(genfunc,rgf_expand) allows the use of the abbreviated form of this command.
with⁡genfunc:
rgf_expand⁡11−5⁢z+6⁢z2,z,n
−2⁢2n+3⁢3n
rgf_expand⁡y1−y−y2,y,k
−5−1⁢5⁢−2−5+1k5⁢−5+1−5⁢−25+1k5
rgf_expand⁡1+2⁢z+3⁢z21−z−z2−z3,z,n
∑_R=RootOf⁡_Z3+_Z2+_Z−1⁡−limz→_R⁡−z−_R⁢3⁢z2+2⁢z+1z3+z2+z−1⁢1_Rn_R
See Also
genfunc/rgf_encode
invztrans
RootOf
ztrans
Download Help Document