gfun[reducerecorder] - Compute a smaller-order P-recurrence for a sequence.
Calling Sequence
reducerecorder(rec, u(n), nmax, procu, eqns, operator=name)
Parameters
rec - valid P-recurrence for u(n), u(n) - sequence and index names,
nmax - posint (optional); maximum number of initial conditions computed, such that u(0),...,u(nmax-1) are used for guessing,
procu - (optional) procedure which computes u(n). It should have remember option,
operator - (optional) name used verbatim as the shift operator; the default is equation,
eqns - (optional) equation(s) of the form option=value where option is nmin; nmin is the minimum number of initial conditions used for guessing. Output
A smaller order recurrence defining u(n) uniquely - possibly rec itself.
Description
- The
reducerecordercommand attempts to compute a small-order recurrence equivalent to a given one. The recurrence looked for can be constrained regarding its minimal order and coefficients' sizes, using gfun:-Parameters options. - The input recurrence may be inhomogeneous. It is used to generate sequence terms for guessing, while its homogenization is used for the operator GCD.
- With
operator=name, the certification still uses the input initial data, but the result is returned as a polynomial in the supplied name and no final output initial conditions are constructed. - The procedure works as follows: - A new recurrence for u(n) is searched for, based on initial conditions : u(0), ..., u(i-1), with i increasing exponentially from nmin to nmax (included). - Once a recurrence of small order is found, enough initial conditions are associated, and it is checked to define the same (infinite) sequence.
- This command is part of the
gfunpackage, so it can be used in the formreducerecorder(..)only after executing the commandwith(gfun). However, it can always be accessed through the long form of the command by usinggfun[reducerecorder](..).
Examples
reducerecorder may help getting information on the asymptotics of a sequence.
> with(gfun):
> rec := { 2*u(n+2)-5*u(n+1)+2*u(n)=0, u(0)=1, u(1)=2 };
> reducerecorder( rec, u(n), 10 );
> rec := { u(n+2) - (n+1)*X*u(n+1) - (2*n+4)*X^2*u(n), u(0)=1, u(1)=2*X };
> reducerecorder( rec, u(n), 10 );
It may simplify operators obtained by indirect means :
> rec := diffeqtorec(algeqtodiffeq( z+y(z)+y(z)^2+y(z)^4, y(z),{y(0)=0}), y(z), u(n));
> reducerecorder(rec,u(n),64);