I'm working on this R.R.:

$\displaystyle a_n = a_{n-1} + n(n+1)$

$\displaystyle a_0 = 3$

when I get to this part of the soln, I am unsure how to get from

$\displaystyle a_n = a_{n-1} + n(n+1) = a_{n-1}+n^2+n$

.

.

.

$\displaystyle = -2(3^{n-1} + 3^{n-2}+ 3^{n-3} + ... + 3^1 + 3^0)$

$\displaystyle = -2(\frac{3^n+1}{3-1}) = 1- 3^n$

specifically, how do you derive the recurrence? I don't understand where the denominator comes from