Find $a_n$ via $a_n - a_{n-1}=3^n$ I remember the middle school taught how to find the closed-form expression of $a_n$ given
$$
a_0=1
$$
$$
a_n - a_{n-1}=3^n
$$
What's name of such sequence? What's general approach to obtain $a_n$?
ps. the sequence is $1,4,13,40, \dots$, i.e.
$$
a_n=\sum_{i=0}^n 3^i
$$
but in this case I don't regard $\sum$ is a closed-form expresstion.
 A: I generalize a tad, setting
$a_0 = a, \tag 1$
$a_n - a_{n - 1} = b^n; \tag 2$
then
$a_1 - a_0 = a_1 - a = b, \tag 3$
$a_1 = a + b; \tag 4$
$a_2 - a_1 = a_2 - (a + b) = b^2, \tag 5$
$a_2 = a + b + b^2; \tag 6$
I make the inductive hypothesis:
$a_k = a + \displaystyle \sum_1^k b^j; \tag 7$
then
$a_{k + 1} = a_k + b^{k + 1} = a + \displaystyle \sum_1^k b^j + b^{k + 1} = a + \sum_1^{k + 1}b^j; \tag 7$
it follows by induction that for general $n \in \Bbb N$,
$a_n = a + \displaystyle \sum_1^n b^j = a + \dfrac{b^{n + 1} - b}{b - 1}; \tag 8$
taking
$a_0 = a = 1, \; b = 3, \tag 9$
we find
$a_n = 1 + \dfrac{3^{n + 1} - 3}{2} = \dfrac{3^{n + 1} - 1}{2}. \tag{10}$
I'm not sure what the name of this sequence is, but it's called a "geometric something-or-other", I'll warrant.
A: Hint
$$a_n = 3^n + a_{n-1} \\
a_{n-1} = 3^{n-1} + a_{n-2} \\
a_{n-2} = 3^{n-2} + a_{n-3} \\
...\\
a_1=3^1+a_0$$
Add everything together. 
A: Telescoping 


*

*$a_n = a_0 + \sum_{k=1}^n (a_k - a_{k-1})$ together with geometric sum

*$\sum_{k=0}^nq^k = \frac{q^{n+1}-1}{q-1}$ give immediately


$$a_n = 1 + \sum_{k=1}^n 3^k =  \sum_{\color{blue}{k=0}}^n 3^k = \frac{3^{n+1}-1}{3-1} = \frac{3^{n+1}-1}{2}$$
