recurence equation: $(\lambda + \gamma) f_n = \gamma (1-p)^{n-1} f_{n+1} + \gamma [1-(1-p)^{n-1}] f_{n+2} + \lambda f_{n-1}$ I am trying to analytically solve the following recurrence equation
$(\lambda + \gamma) f_n = \gamma (1-p)^{n-1} f_{n+1} + \gamma [1-(1-p)^{n-1}] f_{n+2} + \lambda f_{n-1}\,,$
Under constraints of the type $f_{-1}=f_{-2}=0$ and $\sum_{n=0}^\infty f_n = 1$ for $n\geq 0$ and $p \in (0,1), \lambda,\gamma > 0$.
I tried Mathematica's RSolve without success.
1) Is there any hope for an analytical solution?
2) Could you recommend any material that would help me understanding this equation better.
Thanks a lot!
 A: To make it easier to key in,
I will write it as
$(a+b) f_n = b q^{n-1} f_{n+1} + b [1-q^{n-1}] f_{n+2} + af_{n-1}
$,
where
$q = 1-p$.
Getting the highest subscript on the left,
this becomes
$b [1-q^{n-1}] f_{n+2}
=-b q^{n-1} f_{n+1}+(a+b) f_n-af_{n-1}
$.
Shifting the indices up by one,
this becomes
$b [1-q^{n}] f_{n+3}
=-b q^{n} f_{n+2}+(a+b) f_{n+1}-af_{n}
$.
If we try
$f_n = r^n$,
then
$b [1-q^{n}] r^{n+3}
=-b q^{n} r^{n+2}+(a+b) r^{n+1}-ar^{n}
$
or
$b [1-q^{n}] r^{3}
=-b q^{n} r^{2}+(a+b) r-a
$
which doesn't work.
Using the next simplest approach,
let
$F(x)
=\sum_{n=0}^{\infty} f_n x^n
$.
Starting on the $f_n$ term:
$\sum_{n=0}^{\infty} af_n x^n
=-aF(x)
$.
$\sum_{n=0}^{\infty}(a+b) f_{n+1}x^n
=\frac{a+b}{x}\sum_{n=0}^{\infty}(a+b) f_{n+1}x^{n+1}
=\frac{a+b}{x}\sum_{n=1}^{\infty}(a+b) f_{n}x^{n}
=\frac{a+b}{x}(F(x)-f_0)
$.
$\sum_{n=0}^{\infty}b q^{n} f_{n+2} x^n
=\frac{b}{q^2x^2}\sum_{n=0}^{\infty}q^{n+2} f_{n+2} x^{n+2}
=\frac{b}{q^2x^2}\sum_{n=2}^{\infty} f_{n} (qx)^{n}
=\frac{b}{q^2x^2}(F(qx)-f_0-qxf_1)
$.
$\begin{array}\\
\sum_{n=0}^{\infty}b [1-q^{n}] f_{n+3}x^n
&=\frac{b}{x^3}\sum_{n=0}^{\infty} [1-q^{n}] f_{n+3}x^{n+3}\\
&=\frac{b}{x^3}\sum_{n=3}^{\infty} [1-q^{n-3}] f_{n}x^{n}\\
&=\frac{b}{x^3}\left(\sum_{n=3}^{\infty}f_{n}x^{n}
-\sum_{n=3}^{\infty} q^{n-3} f_{n}x^{n}\right)\\
&=\frac{b}{x^3}\left((F(x)-f_0-xf_1-x^2f_2)
-\frac1{q^3}\sum_{n=3}^{\infty}  f_{n}(qx)^{n}\right)\\
&=\frac{b}{x^3}\left((F(x)-f_0-xf_1-x^2f_2)
-\frac1{q^3}(F(qx)-f_0-qxf_1-q^2x^2f_2))\right)\\
&=\frac{b}{x^3}(F(x)-\frac1{q^3}(F(qx))
+\frac{b}{x^3}\left((-f_0-xf_1-x^2f_2)
-\frac1{q^3}(-f_0-qxf_1-q^2x^2f_2))\right)\\
&=\frac{b}{x^3}F(x)-\frac{b}{q^3x^3}F(qx)
+\frac{b}{x^3}\left((\frac1{q^3}-1)f_0+x(\frac1{q^2}-1)f_1-x^2(\frac1{q}-1)f_2
\right)\\
\end{array}
$
Therefore,
$\frac{b}{x^3}F(x)-\frac{b}{q^3x^3}F(qx)
+\frac{b}{x^3}\left((\frac1{q^3}-1)f_0+x(\frac1{q^2}-1)f_1-x^2(\frac1{q}-1)f_2
\right)
=\frac{b}{q^2x^2}(F(qx)-f_0-qxf_1)
+\frac{a+b}{x}(F(x)-f_0)
-aF(x)
$
or
$F(x)(\frac{b}{x^3}-\frac{a+b}{x}+a)
-F(qx)(\frac{b}{q^3x^3}+\frac{b}{q^2x^2})
=f_0(-\frac{b}{x^3}(\frac1{q^3}-1)-\frac{b}{q^2x^2}+\frac{a+b}{x})
+xf_1(-\frac{b}{x^3}+q\frac{b}{q^2x^2})
+x^2f_2\frac{b}{x^3}(\frac1{q}-1)
$.
This can be simplified a little,
but the main thing is that
$F(x)$ is equal to
a function of $F(qx)$
plus some other function.
If $|q| < 1$,
then,
presumably,
we can iterate,
getting $F(x)$
in terms of 
$F(q^2x)$,
then
$F(q^3x)$,
and so on,
finally getting
$F(x)$
in terms of
$F(q^mx)$
for arbitrary $m$.
Letting $m \to \infty$,
this gives $F(x)$
in terms of $F(0)$
and a real mess
(to use technical terminology).
I'll leave it at this,
since this was annoying enough.
