This procedure returns a Maple procedure that, given a non-negative integer n as input, gives the nth term of the linear recurrence.

•

If the argument 'remember' or 'remember'=true is specified, then the procedure will compute the sequence via a recursive procedure using option remember. By default, 'remember'=false and the sequence is computed iteratively.

•

The argument 'remember' should be given when one needs a large number of values of the sequence.

•

When 'remember'=false and the coefficients of the recurrence are nonconstant polynomials, the returned procedure will run in a straight loop, using a linear number of arithmetic operations and without wasting extra space.

•

When 'remember'=false and the coefficients are constant, the procedure will employ a binary-based optimization strategy (for large index values only), and runs with a logarithmic number of arithmetic operations. This optimization can be disabled by specifying constantoptimize=false.

•

When 'remember'=false, by default the initial terms of the recurrence are embedded in the code. This can be changed to put the initial terms of the recurrence in the remember table by specifying initialremember=true.

•

When the first terms of the recurrence are not explicitly supplied, they are represented symbolically.

•

The command with(LREtools,REtoproc) allows the use of the abbreviated form of this command.