This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# LinearRecurrence

 LinearRecurrence gives the sequence of length n obtained by iterating the linear recurrence with kernel ker starting with initial values init. LinearRecurrenceyields terms through in the linear recurrence sequence.
• The ker and init can involve arbitrary symbolic expressions, as well as arrays.
• The initial list init must be at least as long as the kernel list ker.
• If init is longer than ker, only the last Length[ker] elements are used.
• LinearRecurrence iterates the recurrence equation with initial conditions , ..., .
• When coefficients and initial values are arrays, then the iterated recurrence is interpreted as with dot products of coefficient and values.
• If the initial values have dimensions then the coefficients must either be scalar or must have dimensions .
Solve an initial-value problem for a first-order difference equation with kernel :
Find the first few Fibonacci numbers:
 Out[1]=

Solve an initial-value problem for a first-order difference equation with kernel :
 Out[1]=

Find the first few Fibonacci numbers:
 Out[1]=
 Out[2]=
 Scope   (2)
LinearRecurrence works on symbolic kernels and initial values:
LinearRecurrence works on arrays:
Generate a subset of values from a given range:
Get only the last value from an iteration:
 Applications   (1)
Generate recursive sequences, including a Padovan sequence:
Pell numbers:
Pell-Lucas numbers:
Perrin sequence:
RSolve finds a symbolic solution for difference equations:
LinearRecurrence generates a procedural solution:
Initial values are longer than the kernel:
Only the last terms are used:
New in 7