Assume a recurrence relation of the following type with $n\ge 0$
\begin{equation} F(n) a_n+P(n) a_{n+1}+ Q(n)a_{n-1}=\eta \delta_{n,0} \end{equation} where $F(n), P(n), Q(n)$ are polynomials of $n$ and $\delta_{n,0}$ is the Kronecker delta. One way to solve such a problem would be to construct the continued fraction (CF) and if you are lucky, you can find a closed form, let's call it $\Gamma$.
Another approach is to transform this recurrence relation into a differential equation:
First, we shift the coefficients by +1, such that \begin{equation} F(n+1) a_{n+1}+P(n+1) a_{n+2}+ Q(n+1)a_{n}=0 \end{equation}
Second, we assume a power series of a generating function $X(z)=\sum_{n\ge 0} a_n z^n$. We use that given a recurrence with a polynomial coefficient $P(n)a_n$, it can be written as $P(z D) X(z)$, where $D$ is the differentiation operator.
\begin{equation} (F(zD)+1)\frac{X(z)-a_0}{z}+(P(zD)+1)\frac{X(z)-a_0-a_1 z}{z^2} a_{n+2}+ (Q(z D)+1)X(z)=0 \end{equation}
Up until here, it is quite general, so let's simplify by assuming that the polynomial coefficients are up to 2nd order, i.e. $F(n)=f_2 n^2$, $P(n)=p_1 n$, and $Q(n)=q_0$.
\begin{equation} f_2 ((zD)^2+1)\frac{X(z)-a_0}{z}+p_1 (zD+1)\frac{X(z)-a_0-a_1 z}{z^2} a_{n+2}+ q_0 X(z)=0 \end{equation}
Without going into the details, after simplifying we obtain a second order ODE with the following structure
\begin{equation} x_2(z^2)X^{\prime \prime}(z)+x_1(z^2,z)x_1X^{\prime}(z)+x_0(z^2,z)x_0X(z)=a_0 b(z^2,z)+a_1 c(z^2,z) \end{equation}
Let's assume that this is an ODE we can solve analytically (and this is a huge assumption). I have three questions:
In order to solve this ODE, I need 2 initial conditions $X(0)$ and $X^{\prime}(0)$. Is it correct to assume that they are $X(0)=a_0$ and $X^{\prime}(0)=a_1$ from the recurrence relation?
What is the relation between the solution to this ODE $X(z)$ and the closed form of the CF from the recurrence relation $\Gamma$?
To derive my ODE, I used a power series generating function. However, I am aware that sometimes people use an exponential generating function. In it clear in which cases one is more useful than the other?