gfun
listtoratpoly
find a rational generating function
seriestoratpoly
find a rational approximation
Calling Sequence
Parameters
Description
Examples
listtoratpoly(l, x, [typelist])
seriestoratpoly(s, [typelist])
l
-
list
x
name; variable name
typelist
(optional) list of generating function types. The default is 'ogf','egf'. For a complete list of types, see gftypes.
s
series
The listtoratpoly(l, x, [typelist]) command computes a rational function in x for the generating function of the expressions in l. This generating function is one of the types specified by typelist, for example, ordinary (ogf) or exponential (egf). For a complete list of available generating function types, see gftypes.
You should specify as many terms as possible in the list l.
The seriestoratpoly(s, x, [typelist]) command computes a rational function in x for the generating function of the expressions in s. This generating function is one of the types specified by typelist, for example, ordinary (ogf) or exponential (egf). For a complete list of available generating function types, see gftypes.
You should specify as many terms as possible in the series s.
If typelist contains more than one element, these types are considered in the order that they are listed.
If typelist is not specified, the default typelist, 'ogf','egf' is used.
The function returns a list whose first element is the rational function. The second element is the generating function type for which a solution was found.
These functions are frontends to convert[ratpoly] which performs the actual computation.
If the input is the first few elements of the Fibonacci sequence, the function returns the generating series for the Fibonacci numbers.
with⁡gfun:
l≔1,1,2,3,5,8,13
listtoratpoly⁡l,x
−1x2+x−1,ogf
seriestoratpoly⁡series⁡1+x+2⁢x2⁢2!+3⁢x3⁢3!+5⁢x4⁢4!+8⁢x5⁢5!+13⁢x6⁢6!,x,8,egf
−1x2+x−1,egf
See Also
convert[ratpoly]
gfun/gftypes
gfun/parameters
Download Help Document