Here is a general method. You are given $T_n=A(T_{n-1})$ for some affine function $A$, defined by $A(x)=ax+b$, and you want to iterate $A$ because you know that $T_n=A^{n-1}(T_1)$ for every $n\geqslant1$. This is doable because:
- Affine functions are conjugate to linear functions.
- Linear functions are easy to iterate, to wit, if $L:x\mapsto cx$, then $L^n(x)=c^nx$.
Thus, the task is to find $L$ linear such that $A$ and $L$ are conjugate. Here is the only bit to remember:
The function $A$ is conjugate to a linear function $L$ through a translation, for every $a\ne1$, and the translation should send the fixed point of $L$, which is $0$, to the fixed point of $A$.
Hence the first task is to find the fixed point $z_A$ of $A$: this solves $z_A=A(z_A)=az_A+b$, that is, $z_A=b/(1-a)$ (since $a\ne1$).
And now, behold, for every $t$, $A(z_A+t)=A(z_A)+at=z_A+at$. Iterating, one sees that, for every $n$, $A^n(z_A+t)=z_A+a^nt$ for every $t$, that is, $A^n(x)=z_A+a^n(x-z_A)$. (Once again, this algebraic miracle occurs due to the conjugation of $A$ to $L:t\mapsto at$.)
Here, $(a,b)=(3,1)$ hence $z_A=-\frac12$ and $T_n=A^{n-1}(1)=z_A+3^{n-1}(1-z_A)=\frac12(3^n-1)$.