Affine recurrence (source code)

= Affine recurrence

An affine recurrence has the form $x_{n+1}=Ax_n+b$ and is solved by a matrix geometric sum.