<s>[INST] $a_n=(1-\frac{1}{n})a_{n-1}+\frac{1}{n}a_{n-2}$, $\lim_{n\to \infty}a_n$ is Given $a_1,a_2,n\in \mathbb N$
$$a_n=(1-\frac{1}{n})a_{n-1}+\frac{1}{n}a_{n-2}$$
Then $\lim_{n\to \infty}a_n$ is
(A) $2(a_2-a_1)+a_1e^{-1}$
(B) $2(a_1-a_2)e^{-1}+a_2$
(C) $2(a_1-a_2)e^{-1}+a_1$
(D) $2(a_2-a_1)e^{-1}+a_1$
My attempt,
$a_1,a_2\in \mathbb N$
$$a_3=(1-\frac{1}{3})a_{2}+\frac{1}{3}a_{1}$$
$$a_4=(1-\frac{1}{4})a_{3}+\frac{1}{4}a_{2}$$ $$=(1-\frac{1}{4})((1-\frac{1}{3})a_{2}+\frac{1}{3}a_{1})+\frac{1}{4}a_{2}$$ $$=(1-\frac{1}{4})(1-\frac{1}{3})a_{2}+(1-\frac{1}{4})\frac{1}{3}a_{1}$$
$$a_5=(1-\frac{1}{5})a_{4}+\frac{1}{5}a_{3}$$ $$=(1-\frac{1}{5})((1-\frac{1}{4})(1-\frac{1}{3})a_{2}+(1-\frac{1}{4})\frac{1}{3}a_{1})+\frac{1}{5}((1-\frac{1}{3})a_{2}+\frac{1}{3}a_{1})$$ 
But I am not able to conclude from here, I couldn't able to generalise anything from here. 
 [/INST] Let $f(x) = \sum_{n\geq 1} a_n x^n$. Then
\begin{align*}
(1-x) f'(x)
&= a_1 + (2a_2 - a_1) x + x \sum_{n \geq 1} ((n+2) a_{n+2} - (n+1) a_{n+1}) x^n \\
&= a_1 + (2a_2 - a_1) x + x \sum_{n \geq 1} a_n x^n \\
&= a_1 + (2a_2 - a_1) x + x f(x).
\end{align*}
This gives a first-order linear ODE, and solving this together with the initial condition $f(0) = 0$ gives
$$ f(x) = \frac{(2a_2 - a_1)x + 2(a_2 - a_1) (e^{-x} - 1)}{1-x}. $$
Comparing the coefficient of $x^n$ of both sides, we get
$$ a_n = 2a_2 - a_1 + 2(a_2 - a_1) \sum_{k=1}^{n} \frac{(-1)^{k}}{k!}. $$
As $n\to\infty$, this converges to
$$ \lim_{n\to\infty} a_n = 2a_2 - a_1 + 2(a_2 - a_1)(e^{-1} - 1) = 2(a_2 - a_1)e^{-1} + a_1. $$
</s>