Take for example the sequence $a_n=1+\frac{1}{a_{n-1}}$ with $a_1=1$ which is defined recursively.
How do I find the formula for $a_{2n}$ and $a_{2n+1}$? Is there a general approach to find the formulas for any recursively defined sequence $a_n$?
I found a formula saying $a_{2n} = 2 - \frac{1}{1 + a_{n-1}}$ which seems to work out. And by definition of $a_n$, $a_{2n+1} = 1 + \frac{1}{a_{(2n+1)-1}} = 1 + \frac{1}{a_{2n}}$ and the first formula can be used. But I don't understand how $a_{2n}$ was found in the first place.