I know how to solve linear recurrence relations and I'm familiar with generating functions, but I don't know any methods to solve some non-linear recurrence relations.
I stumbled upon the following recurrence relation that I would like to know how to solve. Consider the sequence defined by
$$
a_0 = 0 \quad\text{and}\quad a_{n+1} = \frac{1-a_n}{3+a_n}\quad\text{for }n\geq 0.
$$
I used RSolve
in Mathematica to see that this recurrence relation is solved by
$$
a_n = \frac{\left(\sqrt{5}+1\right)^n-\left(1-\sqrt{5}\right)^n}{\left(\sqrt{5}-2\right) \left(1-\sqrt{5}\right)^n+\left(\sqrt{5}+2\right) \left(\sqrt{5}+1\right)^n}.
$$
But how on earth would I be able to solve something like this on my own? Where does an answer like this come from?