genfunc[rgf_sequence]  extract information about a sequence from its rational generating function

Calling Sequence


rgf_sequence(query, Fz, z, arg4, ...)


Parameters


query



name

Fz



rational generating function

z



name, generating function variable

arg4



additional arguments





Description


•

This command determines information about the sequence encoded by the generating function Fz. All queries assume that the first nonzero term is the first term in the sequence.

•

The possible values for query are:

'boundary'

'coeffs'

'delta'

'first'

'firstcf'

'firstrecur'

'order'

'recur'



•

The 'delta' query returns an expression sequence of delta terms that when added to the closed form expression of the sequence encoded by Fz, completely define the sequence. Each term in the expression sequence is an equality. The left hand side is the index of the term and the right hand side is the value to add to the closed form expression of the sequence to obtain the value of that term.

•

The 'boundary' query returns an expression sequence of boundary conditions for the sequence defined by Fz. Each term in the expression sequence is an equality. The left hand side is the index of the term and the right hand side is the value of the term at that index. A function name can be used as an optional argument arg4, In this case the left hand side of each term in the expression sequence will be the sequence name and index for the boundary term.

•

The 'coeffs' query returns an ordered expression sequence of the coefficients of the recurrence that defines the sequence encoded by Fz. The recurrence is taken to have the form and the sequence is returned in the order . A function name may be used as an optional argument arg4, in which case an expression sequence of equations is returned. The left hand side of each equation is an indexed name for the coefficient and the right hand side is the value of the coefficient.

•

The 'first' query determines the index of the first nonzero term in the sequence encoded by Fz.

•

The 'firstcf' query determines the minimum index from which all terms in the sequence encoded by Fz are defined by the sequence's closed form expansion.

•

The 'firstrecur' query determines the minimum index from which the recurrence defining the sequence encoded by Fz holds.

•

The 'order' query returns the order of the recurrence defining Fz.

•

The 'recur' query determines the recurrence that defines the sequence encoded by the generating function Fz. This query requires that argument arg4 be a function name and argument arg5 be the name of an index variable for the function.

•

The 'coeffs' and 'recur' queries return the value FAIL if Fz is a trivial rational generating function.

•

The command with(genfunc,rgf_sequence) allows the use of the abbreviated form of this command.



Examples


>


>


>


 (1) 
>


 (2) 
>


 (3) 
>


 (4) 
>


 (5) 
>


 (6) 
>


 (7) 
>


 (8) 
>


 (9) 
>


 (10) 


Download Help Document
Was this information helpful?