gfun
listtorec
find a recurrence for the elements
seriestorec
find a recurrence for the coefficients of a series
Calling Sequence
Parameters
Description
Examples
listtorec(l, u(n), [typelist])
seriestorec(s, u(n), [typelist])
l
-
list
u
name; function name
n
name; variable of the function u
typelist
(optional) list of generating function types. The default is 'ogf','egf'. For a complete list of types, see gftypes.
s
series
The listtorec(l, u(n), [typelist]) command computes a linear recurrence with polynomial coefficients satisfied by the expressions in l. A normalization is 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 seriestorec(s, u(n), [typelist]) command computes a linear recurrence with polynomial coefficients satisfied by the expressions in s. A normalization is 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 a set containing the recurrence and its initial conditions. The second element is the generating function type to which it corresponds.
with⁡gfun:
l≔1,1,2,5,14,42,132,429,1430,4862,16796,58786:
rec≔listtorec⁡l,u⁡n
rec≔−4⁢n−6⁢u⁡n+1+n+3⁢u⁡n+2,u⁡0=1,u⁡1=1,ogf
rsolve⁡op⁡1,rec,u⁡n
4n⁢Γ⁡n+12π⁢Γ⁡n+2
rec2≔seriestorec⁡series⁡add⁡li⁢xi−1⁢i−1!,i=1..nops⁡l,x,12,u⁡n,egf
rec2≔−4⁢n−6⁢u⁡n+1+n+3⁢u⁡n+2,u⁡0=1,u⁡1=1,egf
See Also
gfun/gftypes
gfun/parameters
Download Help Document