In mathematics, a recurrence relation is an equation according to which the nth term of a sequence is equal to some combination of the previous terms. Often, only k previous terms of the sequence appear in the equation,...