I am looking at a continued fraction of the form $$ F_n = \cfrac{1}{1+\cfrac{p_1}{1+\cfrac{p_2}{1+\cfrac{p_3}{1+\ldots}}}} $$ where $p_n$ is a function I know. For simplicity I just take it to $p_n=n$ for now. I wish to evaluate this fraction numerically for a given $n$, but I am having conceptual difficulties on how to do it.
I need a starting point, so I first evaluate (I take $n=4$ for the sake of the question): $$ x_0 = \frac{p_3}{1+p_4} $$ This is where I am stuck. How to go "up the ladder" recursively? I'd be happy to get a hint or two.
The continued fraction can be evaluated "top down," which is useful since that makes computations extensible.
Let $F_n=\dfrac{a_n}{b_n}$. The numbers $a_k,b_k$ satisfy the following system of recurrences. $$a_{-1}=0,\qquad a_0=1, \qquad a_k=a_{k-1}+p_ka_{k-2},$$ $$b_{-1}=1,\qquad b_0=1, \qquad b_k=b_{k-1}+p_kb_{k-2},$$ for $k\ge 1$.