1. ## recurrance relation

I'm working on this R.R.:

$a_n = a_{n-1} + n(n+1)$
$a_0 = 3$

when I get to this part of the soln, I am unsure how to get from
$a_n = a_{n-1} + n(n+1) = a_{n-1}+n^2+n$
.
.
.
$= -2(3^{n-1} + 3^{n-2}+ 3^{n-3} + ... + 3^1 + 3^0)$
$= -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

2. Originally Posted by nowrd2xpln
I'm working on this R.R.:

$a_n = a_{n-1} + n(n+1)$
$a_0 = 3$

when I get to this part of the soln, I am unsure how to get from
$a_n = a_{n-1} + n(n+1) = a_{n-1}+n^2+n$
.
.
.
$= -2(3^{n-1} + 3^{n-2}+ 3^{n-3} + ... + 3^1 + 3^0)$
$= -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
$= -2(3^{n-1} + 3^{n-2}+ 3^{n-3} + ... + 3^1 + 3^0)=-2\Sigma_{k=0}^{k=n-1}3^k$ which is a finite geometric series so it $=-2\frac{1-3^n}{1-3}=1-3^n$