Consider a sequence defined recursively by $$a_{n+1}=\frac{ra_n+s}{pa_n+q}$$ where $p,q,r,s$ are real numbers such that $rq-ps \neq 0$ and $p\neq 0$.
Question: Is it possible to find a closed form for $a_n$?
The concrete situation I am facing is $a_{n+1}=\frac{3a_n+1}{a_n+3}$, $a_1=2$. The hint provided with the problem is to consider $b_n=\frac{a_n-1}{a_n +1}$ and show that $\{b_n\}$ is geometric.
That works in the present situation, but I am not satisfied as I cannot see any relation between the definitions of $\{a_n\}$ and $\{b_n\}$.