Example $7 a_{1}=1, a_{2}=2, a_{n+2}=\frac{2 a_{n} a_{n+1}}{a_{n}+a_{n+1}}$. Find $a_{n}$.
Let $b_{n}=\frac{1}{a_{n}}$, then we have $b_{n+2}=\frac{1}{2} b_{n+1}+\frac{1}{2} b_{n}$. This can be rewritten as $b_{n+2}-b_{n+1}=-\frac{1}{2}\left(b_{n+1}-b_{n}\right)=\cdots=\left(-\frac{1}{2}\right)^{n}\left(b_{2}-b_{1}\right)$.
Thus, we have $\quad b_{k}-b_{k-1}=\left(-\frac{1}{2}\right)^{k-1}$.
Let $k=1,2, \cdots, n$, summing up we get
$$
\begin{aligned}
b_{n} & =b_{1}-\frac{1}{3}\left(1-\left(-\frac{1}{2}\right)^{n-1}\right) \\
& =\frac{2}{3}+\frac{1}{3}\left(-\frac{1}{2}\right)^{n-1} .
\end{aligned}
$$

Therefore, $a_{n}=\frac{3}{2+\left(-\frac{1}{2}\right)^{n-1}}$.