How do get combination sequence formula? What would be a closed-form formula that would determine the ith value of the sequence
1, 3, 11, 43, 171...
where each value is one minus the product of the previous value and 4?
Thanks!
 A: The general formula is:
$$a_n=\frac{2}{3}4^n+\frac{1}{3}$$
This can be derived using the trick of converting a non-homogeneous difference equation, which in this case is $a_n=4a_{n-1}-1$, into a homogeneous one of a higher degree, which in this case is $a_{n+1}=5a_n-4a_{n-1}$. This has characteristic polynomial $x^2-5x+4=(x-4)(x-1)$, and therefore
$$a_n=\alpha 4^n+\beta 1^n$$
for some $\alpha, \beta$. Solving the system $$1=a_0=\alpha+\beta$$
$$3=a_1=4\alpha+\beta$$ gives $\alpha=\frac{2}{3}$ and $\beta=\frac{1}{3}$.
A: The following is a simple way of solving the problem. The recurrence has the shape
$$y_{n+1}=4y_n-1$$
It would be nice if the recurrence looked like
$$u_{n+1}=4u_n$$
Then life would be easy. Unfortunately, we have that pesky $-1$ that spoils things!
So let's try for the next best thing.  Could we transform our recurrence to something of the shape
$$y_{n+1}-a=4(y_n-a)$$
where $a$ is a constant?  Do a bit of arithmetic.  We get $y_{n+1}=4y_n-3a$.  If we choose $a=1/3$, we can get our recurrence into the desired shape.
Thus we can rewrite our recurrence as
$$y_{n+1} -\frac{1}{3}=4\left(y_n -\frac{1}{3}\right)$$  
Temporarily, let 
$$u_n=y_n-\frac{1}{3}$$
for all $n$. Then 
$$u_{n+1}=4u_n$$
Now we have to decide whether we start our indices at $0$ or at $1$.  Like many mathematicians, I prefer to start at $0$.  (Starting at $1$ would not change things very much.)
We have $y_0=1$, so $u_0=1-1/3=2/3$.
And because to get the "next" $u$ we multiply the previous $u$ by $4$, we have
$$u_n=\left(\frac{2}{3}\right)4^n$$
But $y_n=u_n+1/3$. It follows that
$$y_n=\left(\frac{2}{3}\right)4^n +\frac{1}{3}$$
Comment: Essentially the same method works for the recurrence $y_{n+1}=cy_n+d$ where $c$ and $d$ are constants, and the idea can be adapted to deal with many other situations.  
A: The OEIS gives the closed form formula of this sequence to be 
$$
\frac{2^{(2n+1)} + 1}{3}. 
$$
A: The sequence can be written using the recurrence formula:  $y_n = a+by_{n-1}$ . Then using the first 3 terms, one gets $y_1=1, a=-1, b=4 $
Sometimes it is easy to convert a recurrence formula to a closed-form, by studding the structure of the math relations. 
$y_1 = 1$ 
$y_2 = a+by_1$ 
$y_3 = a+by_2 = a+b(a+by_1) = a+ab+b^2y_1$ 
$y_4 = a+by_3 = a+b(a+by_2) = a+ab+ab^2+b^3y_1$ 
$y_5 = a+ab+ab^2+ab^3+b^4y_1$ 
there is a geometric sequence  $a+ab+ab^2.. = a(1+b+b^2...) $ 
$ (1+b+b^2...b^n) = (1-b^{n+1}) / (1-b) $ 
therefore the general formula is: 
$y_n = a+ab+ab^2+...+ab^{n-2}+b^{n-1}y_1$ 
$y_n = a(1-b^{n-1}) / (1-b) + b^{n-1}y_1 $ 
Using the above parameters, $y_1=1 , a=-1,   b=4, $ 
$y_n = -1(1-4^{n-1})/(1-4) +4^{n-1}y_1$ 
$y_n = -\frac{4^{n-1}}{3} +\frac13 +4^{n-1}y_1$ 
$y_n = \frac{2}{3}4^{n-1} + \frac{1}{3} $
