listtorec - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

gfun

 listtorec
 find a recurrence for the elements
 seriestorec
 find a recurrence for the coefficients of a series

 Calling Sequence listtorec(l, u(n), [typelist]) seriestorec(s, u(n), [typelist])

Parameters

 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

Description

 • 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.

Examples

 > $\mathrm{with}\left(\mathrm{gfun}\right):$
 > $l≔\left[1,1,2,5,14,42,132,429,1430,4862,16796,58786\right]:$
 > $\mathrm{rec}≔\mathrm{listtorec}\left(l,u\left(n\right)\right)$
 ${\mathrm{rec}}{≔}\left[\left\{\left({-}{4}{}{n}{-}{6}\right){}{u}{}\left({n}{+}{1}\right){+}\left({n}{+}{3}\right){}{u}{}\left({n}{+}{2}\right){,}{u}{}\left({0}\right){=}{1}{,}{u}{}\left({1}\right){=}{1}\right\}{,}{\mathrm{ogf}}\right]$ (1)
 > $\mathrm{rsolve}\left(\mathrm{op}\left(1,\mathrm{rec}\right),u\left(n\right)\right)$
 $\frac{{{4}}^{{n}}{}{\mathrm{\Gamma }}{}\left({n}{+}\frac{{1}}{{2}}\right)}{\sqrt{{\mathrm{\pi }}}{}{\mathrm{\Gamma }}{}\left({n}{+}{2}\right)}$ (2)
 > $\mathrm{rec2}≔\mathrm{seriestorec}\left(\mathrm{series}\left(\mathrm{add}\left(l\left[i\right]{x}^{i-1}\left(i-1\right)!,i=1..\mathrm{nops}\left(l\right)\right),x,12\right),u\left(n\right),\left['\mathrm{egf}'\right]\right)$
 ${\mathrm{rec2}}{≔}\left[\left\{\left({-}{4}{}{n}{-}{6}\right){}{u}{}\left({n}{+}{1}\right){+}\left({n}{+}{3}\right){}{u}{}\left({n}{+}{2}\right){,}{u}{}\left({0}\right){=}{1}{,}{u}{}\left({1}\right){=}{1}\right\}{,}{\mathrm{egf}}\right]$ (3)