# Evaluation of a slow continued fraction

Puzzle question... I know how to solve it, and will post my solution if needed; but those who wish may participate in the spirit of coming up with elegant solutions rather than trying to teach me how to solve it. [paraphrased from Lone Learner]

Evaluate the continued fraction $$1+\cfrac{-5}{13+\cfrac{-128}{37+\cfrac{-693}{73+\cfrac{-2240}{121+\ddots}}}}= b_0+\cfrac{a_1}{b_1+\cfrac{a_2}{b_2+\cfrac{a_3}{b_3+\cfrac{a_4}{b_4+\ddots}}}}$$ where $b_n = 6n^2+6n+1$, $a_n=4n^2-9n^4$.

Can you determine whether it converges, and if so find its value? Numerical computations suggest it converges extremely slowly.

Let \begin{align*} p_n &= (6n^2+6n+1) p_{n-1}+(4n^2-9n^4) p_{n-2}, \quad p_{-1} = 1, \quad p_0=1, \\ q_n &= (6n^2+6n+1) q_{n-1}+(4n^2-9n^4)q_{n-2}, \quad q_{-1} = 0, \quad q_0=1, \\ r_n &= \frac{p_n}{q_n}. \end{align*} So the $r_n$ are the convergents of the continued fraction: $$r_0 = 1,\quad r_1 = 1+\cfrac{-5}{13},\quad r_2 = 1+\cfrac{-5}{13+\cfrac{-128}{37}},\quad r_3 = 1+\cfrac{-5}{13+\cfrac{-128}{37+\cfrac{-693}{73}}},$$
Now a problem is that generating functions $$\sum_{n=0}^\infty p_n x^n,\qquad\text{and}\qquad \sum_{n=0}^\infty p_n \frac{x^n}{n!}$$ both have radius of convergence zero. So they are no good in Hayman's method. So we will use "Bessel" generating functions $$f(x) = \sum_{n=0}^\infty p_{n-1}\frac{x^n}{(n!)^2},\qquad g(x) = \sum_{n=0}^\infty q_{n-1}\frac{x^n}{(n!)^2} .$$
Use the recurrences to compute the differential equations these satisfy. They are \begin{align*} L[f]&=0,\qquad f(0)=1,\qquad f'(0)=1, \tag{1} \\ L[g]&=1,\qquad g(0)=0,\qquad g'(0)=1, \tag{2} \end{align*} where second-order linear differential operator $L$ is given by $$L[\phi](x) = x(1-3x)^2 \phi''(x)+(1-3x)(1-9x)\phi'(x)+(-1+5x)\phi(x)$$ Now the solution of (1) is $$f(x) = (1-3x)^{-1/3} = 1 + x + 2 x^2 + \frac{14}{3} x^3 + \frac{35}{3} x^4 +O(x^5) .$$ The coefficient shows $$p_{n-1} \sim \frac{(n!)^2 3^n n^{-2/3}}{\Gamma(1/3)}$$ With the help of Maple, I get the solution of (2) as $$g(x) = \frac{3}{2}(1-3x)^{-2/3} + \sqrt{3}\arctan\left(\frac{1+2(1-3x)^{1/3}}{\sqrt{3}}\right)(1-3x)^{-1/3}- \frac{9+2\pi\sqrt{3}}{6}(1-3x)^{-1/3}$$ and in powers of $(1-3x)$, $$g(x) = \frac{3}{2}(1-3x)^{-2/3}- \left(\frac{\pi}{2\sqrt{3}}+\frac{3}{2}\right)(1-3x)^{-1/3}+\frac{3}{2}+ O\left((1-3x)^{1/3}\right) .$$ Now we need to examine the coefficients at $x=0$ for the Taylor series. The first term has coefficient given asymptotically by $C 3^n n^{-1/3}$. The second term by $C 3^n n^{-2/3}$, the constant term by $0$. So overall we get $$q_{n-1} \sim C (n!)^2 3^n n^{-1/3} .$$ So the convergent $$r_{n-1} = \frac{p_{n-1}}{q_{n-1}} \sim C n^{-2/3+1/3}$$ goes to zero. The value of the continued fraction is $0$.
Note that the differential operator $L$ in terms of $y=1-3x$ is $$9y^2(1-y)\phi''(x)+9y(2-3y)\phi'(y)+(2-5y)\phi(y)$$ with indicial polynomial $9r(r-1)+18r+2 = (3r+2)(3r+1)$ roots $-1/3, -2/3$. This is the reason for the type of series we got.