$$a_n=3a_{n-1}+1; a_0=1$$
The book has the answer as: $$\frac{3^{n+1}-1}{2}$$
However, I have the answer as: $$\frac{3^{n}-1}{2}$$
Based on:

Which one is correct?
Using backwards substitution iteration, the end of this will be $$3^{n-1}a_0+3^{n-2}+3^{n-3}+...+3+1$$
which is $$=3^{n-1}+3^{n-2}+3^{n-3}+...+3+1=\sum_{i=0}^{n-1}3^i$$
Which according to the theorem should be $$\frac{3^{(n-1)+1}-1}{(3-1)}=\frac{3^{n}-1}{2}$$