listtolist - Maple Help

gfun

 listtoseries
 convert a list into a series
 seriestolist
 convert a series into a list
 listtolist
 convert a list into a list
 seriestoseries
 convert a series into a series

 Calling Sequence listtoseries(l, x, gf) listtolist(l, gf) seriestolist(s, gf) seriestoseries(s, gf)

Parameters

 l - list x - name; unknown variable gf - (optional) generating function type, e.g., 'egf' or 'ogf' s - series

Description

 • The listtoseries(l, x, gf) command accepts a list as input and returns a series.
 By default, the listtoseries function creates a power series whose coefficients are exactly the elements of the list specified.
 • The listtolist(l, gf) command accepts a list as input and returns a list.
 By default, the listtolist function returns the input list unchanged.
 • The seriestolist(s, gf) command accepts a series as input and returns a list.
 By default, the seriestolist command returns a list whose entries are exactly the coefficients of the series specified.
 • The seriestoseries(s, gf) command accepts a series as input and returns a series.
 By default, the seriestoseries function returns the input series unchanged.
 • Lists are viewed as lists of coefficients of power series and reciprocally series are viewed as generating series of lists of coefficients.
 • If gf is specified, it is considered to be a type of generating function. The coefficients of the output are those of the corresponding generating function of the input.
 E.g., listtoseries(l, x, 'egf') resp. listtolist(l, 'egf') returns the series resp. the list whose coefficients are $\frac{{l}_{i+1}}{i!}$ for $0\le i$. Similarly, if s is a series with coefficients ${s}_{i}$ for $0\le i$, then seriestoseries(s, 'egf') resp. seriestolist(s, 'egf') returns the series resp. the list whose coefficients are $\frac{{s}_{i}}{i!}$.

Examples

 > $\mathrm{with}\left(\mathrm{gfun}\right):$
 > $l≔\left[1,1,2,5,14,42,132,429,1430,4862,16796,58786\right]:$
 > $\mathrm{listtoseries}\left(l,x,'\mathrm{egf}'\right)$
 ${1}{+}{x}{+}{{x}}^{{2}}{+}\frac{{5}}{{6}}{}{{x}}^{{3}}{+}\frac{{7}}{{12}}{}{{x}}^{{4}}{+}\frac{{7}}{{20}}{}{{x}}^{{5}}{+}\frac{{11}}{{60}}{}{{x}}^{{6}}{+}\frac{{143}}{{1680}}{}{{x}}^{{7}}{+}\frac{{143}}{{4032}}{}{{x}}^{{8}}{+}\frac{{2431}}{{181440}}{}{{x}}^{{9}}{+}\frac{{4199}}{{907200}}{}{{x}}^{{10}}{+}\frac{{4199}}{{2851200}}{}{{x}}^{{11}}{+}{O}{}\left({{x}}^{{12}}\right)$ (1)

The LambertW function is the inverse of $y{ⅇ}^{-y}$.  The following is a simple way to compute Taylor expansions of such functions.

 > $S≔\mathrm{series}\left(y\mathrm{exp}\left(-y\right),y\right)$
 ${S}{≔}{y}{-}{{y}}^{{2}}{+}\frac{{1}}{{2}}{}{{y}}^{{3}}{-}\frac{{1}}{{6}}{}{{y}}^{{4}}{+}\frac{{1}}{{24}}{}{{y}}^{{5}}{+}{O}{}\left({{y}}^{{6}}\right)$ (2)
 > $\mathrm{seriestoseries}\left(S,'\mathrm{revogf}'\right)$
 ${y}{+}{{y}}^{{2}}{+}\frac{{3}}{{2}}{}{{y}}^{{3}}{+}\frac{{8}}{{3}}{}{{y}}^{{4}}{+}\frac{{125}}{{24}}{}{{y}}^{{5}}{+}{O}{}\left({{y}}^{{6}}\right)$ (3)

You can then extract the list of coefficients.

 > $L≔\mathrm{seriestolist}\left(\right)$
 ${L}{≔}\left[{0}{,}{1}{,}{1}{,}\frac{{3}}{{2}}{,}\frac{{8}}{{3}}{,}\frac{{125}}{{24}}\right]$ (4)

Multiplying the nth coefficient by $n!$ recovers the number of planar trees of size n.

 > $\mathrm{listtolist}\left(L,'\mathrm{Laplace}'\right)$
 $\left[{0}{,}{1}{,}{2}{,}{9}{,}{64}{,}{625}\right]$ (5)