# Trying to form a formula for a specific sequence

The problem goes like this: Construct a sequence by setting $$a_1 = 5$$. Then compute $$a_3$$ and $$a_4$$ then prove that the $$n^{th}$$ term is given by the formula $$a_n = 3^n+2$$.

The sequence goes like this: $$a_1, a_2, a_3, a_4, ....,$$ [Formula here to calculate $$a_n$$th term].

a_1 starts at 5 and to calculate $$a_2$$ we do the following: 3(5) - 4 so for the formula I wrote it as 3($$a_n$$ - 1) - 4. However, this entire sequence is equal to $$3^n+2$$ and when using $$n = 1$$ to show both sides have a base case (proof by induction) it clearly does not work.

It works ! If $$a_1=5$$ and $$a_n=3a_{n-1}-4$$ for $$n \ge 2$$, then a straightforward inductive proof gives $$a_n=3^n+2$$.