<s>[INST] what is the limit of the sequence $x_0=a$, $x_1=b$ define $$x_{n+1}=\left(1-\frac{1}{2n}\right)x_n+ \frac{1}{2n} x_{n-1}$$
we need to find the limit of $\{x_n\}_n$ as $n\rightarrow \infty$. 
Let $l$ be this limit , I tried taking the limit on both sides getting $l=l$ as $n\rightarrow \infty$.
 [/INST] As $x_{n+1}=(1-\frac{1}{2n})x_{n}+\frac{1}{2n}x_{n-1}$, we can get that:
$$\begin{align*}
x_{n+1}-x_{n}&=-\frac{1}{2n}(x_{n}-x_{n-1})\\
x_{n}-x_{n-1}&=-\frac{1}{2(n-1)}(x_{n-1}-x_{n-2})\\
&\vdots\\
x_{2}-x_{1}&=-\frac{1}{2}(x_{1}-x_{0})\\
\end{align*}$$
then,by computation $$x_{n+1}-x_{n}=\frac{(-\frac{1}{2})^{n}}{n!}(b-a)$$
$$\begin{align*}
x_{n}&=\sum_{k=0}^{n-1}(x_{k+1}-x_{k})+x_{0}\\
&=a+(b-a)\sum_{k=0}^{n-1}\frac{(-\frac{1}{2})^{k}}{k!}\\
\end{align*}$$
$$\begin{align*}
\lim_{n\rightarrow\infty}x_{n}
&=a+(b-a)\sum_{k=0}^{\infty}\frac{(-\frac{1}{2})^{k}}{k!}\\
&=a+(b-a)e^{-\frac{1}{2}}\\
&=(1-e^{-\frac{1}{2}})a+e^{-\frac{1}{2}}b
\end{align*}$$
</s>