Paragraph

The above example shows a way to solve recurrence relations of the form \(a_n = a_{n-1} + f(n)\) where \(\sum_{k = 1}^n f(k)\) has a known closed formula. If you rewrite the recurrence relation as \(a_n - a_{n-1} = f(n)\text{,}\) and then add up all the different equations with \(n\) ranging between 1 and \(n\text{,}\) the left-hand side will always give you \(a_n - a_0\text{.}\) The right-hand side will be \(\sum_{k = 1}^n f(k)\text{,}\) which is why we need to know the closed formula for that sum.

in-context