<s>[INST] Closed form of $u_n$ with $u_{0} =1$ and $u_n=\frac{1}{3}u_{n-1}-1$? Let $u_n$ be a sequence defined by recurrence relation as : $u_{0} =1$ and $u_n=\frac{1}{3}u_{n-1}-1$, I'm not familiar to look for the closed form of $u_n $ , I have tried to find $u_n $ with a function of $n$ but I don't succeed because it's not defined as an arithmetic progression or a geometric progression. Then, is there any simple way to get it closed form ?
Thank for any help 
 [/INST] You can express $u_n$ through $u_0$ sequentially through $u_{n-1}$, $u_{n-2}$ and so on
$$u_n =
\frac{1}{3} \cdot u_{n-1} - 1$$
Substitute $u_{n-1}$
$$u_n = \frac{1}{3} \left( \frac{1}{3} \cdot u_{n-2} - 1 \right) - 1 =
\frac{1}{3^2} \cdot u_{n-2} - \frac{1}{3} - 1$$
Then $u_{n-2}$ and so on
$$u_n =
\frac{1}{3^2} \left( \frac{1}{3} \cdot u_{n-3} - 1 \right) - \frac{1}{3} - 1 =
\frac{1}{3^3} \cdot u_{n-3} - \frac{1}{3^2} - \frac{1}{3} - 1 =
\dotsc$$
Finally
$$u_n = \frac{1}{3^n} - \sum \limits_{k = 1}^n \frac{1}{3^{n-k}}$$
To check this formula we can use mathematical induction.
The base case:
$$n = 1: u_1 = \frac{1}{3} - 1$$
The inductive step:
$$u_{n+1} = \frac{1}{3} \cdot u_n - 1 =
\frac{1}{3} \left( \frac{1}{3^n} - \sum \limits_{k=1}^n \frac{1}{3^{n-k}} \right) - 1 =
\frac{1}{3^{n+1}} - \sum \limits_{k=1}^n \frac{1}{3^{n+1-k}} - 1$$
We can substitute
$$1 = \frac{1}{3^{n+1 - k}}$$
where $k = n+1$, thus
$$u_{n+1} = \frac{1}{3^{n+1}} - \sum \limits_{k=1}^{n+1} \frac{1}{3^{n+1-k}}$$
So the formula is right
</s>