<s>[INST] Find $a_1+\frac{a_2}{2}+\frac{a_3}{2^2}+\cdots\infty$ A sequence $\left\{a_n\right\}$ is defined as $a_n=a_{n-1}+2a_{n-2}-a_{n-3}$ and $a_1=a_2=\frac{a_3}{3}=1$

Find the value of $$a_1+\frac{a_2}{2}+\frac{a_3}{2^2}+\cdots\infty$$

I actually tried this using difference equation method.Let the solution be of the form $a_n=\lambda^n$
$$\lambda^n=\lambda^{n-1}+2\lambda^{n-2}-\lambda^{n-3}$$ which gives the cubic equation $\lambda^3-\lambda^2-2\lambda+1=0$. But i am not able to find the roots manually.
 [/INST] Let $$S=\sum_{n=1}^{\infty}\frac{a_n}{2^{n-1}}$$
We have,
$$S=\frac{1}{1}+\frac{1}{2}+\frac{3}{4}+P$$
Where $$P=\sum_{n=4}^{\infty}\frac{a_n}{2^{n-1}}$$
Using the given recurrence we have,
$$P=\sum_{n=4}^{\infty}\frac{a_{n-1}+2a_{n-2}-a_{n-3}}{2^{n-1}}$$
So we get,
$$P=\sum_{n=4}^{\infty}\frac{a_{n-1}}{2^{n-1}}+2\sum_{n=4}^{\infty}\frac{a_{n-2}}{2^{n-1}}-\sum_{n=4}^{\infty}\frac{a_{n-3}}{2^{n-1}}$$
By Change of variable for each summation we get
$$P=\sum_{k=3}^{\infty}\frac{a_k}{2^{k}}+2\sum_{k=2}^{\infty}\frac{a_k}{2^{k+1}}-\sum_{k=1}^{\infty}\frac{a_k}{2^{k+2}}$$
Which implies
$$P=\frac{1}{2}\sum_{k=3}^{\infty}\frac{a_k}{2^{k-1}}+\frac{2}{4}\sum_{k=2}^{\infty}\frac{a_k}{2^{k-1}}-\frac{1}{8}\sum_{k=1}^{\infty}\frac{a_k}{2^{k-1}}$$
$\implies$
$$P=\frac{1}{2}\left(\frac{a_3}{4}+P\right)+\frac{1}{2}\left(\frac{a_2}{2}+\frac{a_3}{4}+P\right)-\frac{S}{8}$$
Using $a_3=3,a_2=1$
$$P=\frac{3}{8}+\frac{P}{2}+\frac{1}{4}+\frac{3}{8}+\frac{P}{2}-\frac{S}{8}$$
Thus we get
$$\frac{S}{8}=\frac{3}{8}+\frac{1}{4}+\frac{3}{8}$$
$\implies$
$$S=8$$
</s>