See also section 5.14.3.
The seqsolve command takes three arguments; an expression or
list of expressions that define a recurrence relation, the variables
used, and the starting values. For example, if a recurrence relation
is defined by un+1 = f(un,n) with u0 = a, the arguments to
seqsolve will be f(x,n), [x,n] and
a. If the recurrence relation
is defined by un+2 = g(un,un+1,n) with u0 = a and u1 = b, the arguments to
seqsolve will be g(x,y,n), [x,y,n] and
[a,b]. The recurrence relation must have a homogeneous
linear part, the nonhomogeneous part must be a linear combination of a
polynomials in n times geometric terms in n.
seqsolve returns the sequence, as a function of n.
Examples: