Finding the general formula $a_n$ for $a_n = \frac{1}{2a_{n-1}} + 2a_{n-2}$ How to calculate the general formula $a_n$ for the following sequence:
$$a_n = \frac{1}{2a_{n-1}} + 2a_{n-2}$$
where $a_1=\frac{1}{2}, a_2=\frac{1}{4}$

$$\begin{align}&a_{n} = \frac{1}{2 a_{n-1}} + 2 a_{n-2}\\
\iff & 2 a_{n} a_{n-1} + 1 = 2 ( 2 a_{n-1} a_{n-2} + 1)\\
\implies  & 2 a_{n} a_{n-1} + 1 = 2^{n-2} (2 a_2 a_1 + 1 ) = \frac{5}{16} 2^n\\
\implies  & a_{n}/a_{n-2} = \frac{\frac{5}{16} 2^n - 1}{\frac{5}{32} 2^n - 1}\\
\implies  & a_{n} = \begin{cases} 
a_2 \prod_{k=0}^{m-1} (\frac{\frac{5}{16} 2^n - 4^k}{\frac{5}{32} 2^n - 4^k}), & \text{for}\;n = 2m\\
a_1 \prod_{k=0}^{m} (\frac{\frac{5}{16} 2^n - 4^k}{\frac{5}{32} 2^n - 4^k}), &
\text{for}\;n = 2m+1
\end{cases}
\end{align}$$
This give us a pretty ugly list $a_i = ( \frac{1}{2},\frac{1}{4},3,\frac{2}{3},\frac{27}{4},\frac{38}{27},\frac{1053}{76},\frac{3002}{1053},\frac{167427}{6004},\frac{957638}{167427}, \ldots )$ and I cannot see any obvious pattern in it.
