<s>[INST] How can I determine general formula of this sequence? I am trying to find general formula of the sequence $(x_n)$  defined by
$$x_1=1, \quad x_{n+1}=\dfrac{7x_n + 5}{x_n + 3}, \quad \forall n>1.$$
I tried
put $y_n = x_n + 3$, then $y_1=4$ and
$$\quad y_{n+1}=\dfrac{7(y_n-3) + 5}{y_n }=7 - \dfrac{16}{y_n}, \quad \forall n>1.$$
From here, I can't solve it. How can I determine general formula of above sequence?
With Mathematica, I found $x_n = \dfrac{5\cdot 4^n-8}{4^n+8}$. I want to know a method to solve problem, than have a given formula.
 [/INST] Here is a method that I read from a book. Yet I did not think deeply why it works in general.

If there exists real numbers $\alpha$, $\beta$ and $r$ such that
$$\frac{a_{n+1}-\beta}{a_{n+1}-\alpha}=r\cdot\frac{a_n-\beta}{a_n-\alpha}$$
for all $n\in\mathbb{N}$, then the sequence $\{b_n\}$, where $b_n=\frac{a_n-\beta}{a_n-\alpha}$, would be geometric and can be solved easily.
So our job is to find such $\alpha$, $\beta$ and $r$.
Substituting the recurring equation,
\begin{align}
\frac{a_{n+1}-\beta}{a_{n+1}-\alpha}&=\frac{\frac{7a_n+5}{a_n+3}-\beta}{\frac{7a_n+5}{a_n+3}-\alpha} \\
&=\frac{7a_n+5-\beta(a_n+3)}{7a_n+5-\alpha(a_n+3)} \\
&=\frac{(7-\beta)a_n+(5-3\beta)}{(7-\alpha)a_n+(5-3\alpha)} \\
&=\frac{7-\beta}{7-\alpha}\cdot\frac{a_n-\left(-\frac{5-3\beta}{7-\beta}\right)}{a_n-\left(-\frac{5-3\alpha}{7-\alpha}\right)}
\end{align}
Hence the trick should work if there is a solution for $\alpha=-\frac{5-3\alpha}{7-\alpha}$ and $\beta=-\frac{5-3\beta}{7-\beta}$ and $r=\frac{7-\beta}{7-\alpha}$.
Noting that $\alpha$ and $\beta$ are roots of $u=-\frac{5-3u}{7-u}$.
\begin{align}
u&=-\frac{5-3u}{7-u} \\
u(7-u)&=-(5-3u) \\
u^2-4u-5&=0 \\
u&=-1\enspace\text{or}\enspace 5 \\
\end{align}
Take $(\alpha,\,\beta)=(-1,\,5)$. $r=\frac{7-5}{7-(-1)}=\frac{1}{4}$ follows.
$$b_1=\frac{a_1-\beta}{a_1-\alpha}=\frac{1-5}{1-(-1)}=-2$$
For all $n\in\mathbb{N}$,
$$b_n=r^{n-1}\cdot b_1=\left(\frac{1}{4}\right)^{n-1}(-2)=\frac{-8}{4^n}$$
Back substitute into $b_n=\frac{a_n-\beta}{a_n-\alpha}$.
\begin{align}
\frac{-8}{4^n}&=\frac{a_n-5}{a_n-(-1)} \\
-8(a_n+1)&=4^n(a_n-5) \\
a_n&=\frac{5\cdot 4^n-8}{4^n+8}
\end{align}
The same result as given by Mathematica.
</s>