This question is reposted from Math Stack Exchange [(you can see the original post here)][1]. The motivation for reposting is that I feel like the question isn't getting much attention in MSE - if there is something wrong with reposting I have no problem with deleting the question and obviously being sorry for any inconvenience caused. Follows the question:

**Conext and notation.** In the question below, $R_n(z) / S_n(z)$ denotes the n-th convergent of the continued fraction 

$$ \frac{1|}{|z-b_1} + \frac{-a_2|}{|z-b_2} + \dots + \frac{-a_n|}{|z-b_n} + \dots,$$

where $a_n,b_n$ are the coefficients of a generic orthogonal sequence of monic polynomials $\{p_n(z)\}$ that satisfies the three term recurrence relation 

$$ p_n(z) = (x-b_n)p_{n-1}(z) - a_np_{n-2}(z), \quad \text{ for } \, \, n= 1,2,\dots$$

**The problem.** Define the function 

$$ \hat w(z) = \int_a^b \frac{1}{z-t}w(t) dt,$$
which is normally known as the [Stieltjes transformation.][1] I wish to prove that 

\begin{equation} \tag{1} \hat w(z) - \frac{R_n(z)}{S_n(z)} = \frac{1}{p_n(z)}\int_a^b \frac{p_n(t)}{z-t}w(t) \, dt.\end{equation}

and 

\begin{equation} \tag{2} \hat w(z) - \frac{R_n(z)}{S_n(z)} = \frac{k_n^1}{z^{2n+1}} + \frac{k_n^2}{z^{2n+2}} + \dots, \quad |z| > R, \end{equation}

where $R$ is big enough to guarantee uniform convergence of the series $\displaystyle{\sum_{j=0}^\infty \frac{t^j}{z^{j+1}}}.$

**My attempt.** I was able to prove $(1)$ with ease. Identity $(2)$ gave me quite some more problems. Follows my attempt:

We have that 

\begin{equation*}
 \begin{split}
 \hat w(z) - \frac{R_n(z)}{S_n(z)} &= \frac{1}{p_n(z)} \int_a^b
 \frac{p_n(t)}{z-t}w(t) \, dt \\[.25cm]
&= \frac{1}{p_n(z)} \int_a^b \sum_{j=0}^\infty \frac{t^j}{z^{j+1}}p_n(t) w(t) \, dt \\[.25cm]
&= \frac{1}{p_n(z)} \sum_{j=0}^\infty \frac{1}{z^{j+1}} \boxed{\int_a^b t^j p_n(t) w(t) \, dt}.
\end{split}
\end{equation*}

So, all we have to do is study the boxed integral above. From the theory of orthogonal polynomials, we know that for $j<n$ this integral is zero and for $j=n$ we have that 

$$ \int_a^b t^np_n(t) w(t) \, dt = \gamma_n h_n, $$

where $\displaystyle{h_n = \int_a^b p_n^2(t)w(t) \, dt}$ and $\gamma_n$ is such that $\displaystyle{t^n = \sum_{i=0}^n \gamma_i p_i(t)}$ (recall that $\{p_0(t),\dots,p_n(t)\}$ forms a basis for the vectorial space of the polynomials in one variable of degree equal or smaller than $n$). So everything we have to do is to study the boxed integral for values of $j$ such that $j > n.$ For this cases, it is clear that $\{ p_0(t),\dots,p_j(t)\}$ forms a basis for the vectorial space of the polynomials in one variable of degree equal or smaller than $j$. Therefore, we can find scalars $\delta_i$ such that 
$$ t^j = \sum_{i=0}^j \delta_i p_i(t). $$
Then,
$$ \int_a^b t^j p_n(t) w(t) \, dt = \sum_{i=0}^j \delta_i \int_a^b p_i(t)p_n(t) w(t) \, dt = \delta_n h_n. $$
Therefore, we have that 

$$ \hat w(z) - \frac{R_n(z)}{S_n(z)} = \frac{1}{p_n(z)}\left[ \frac{\gamma_n h_n}{z^{n+1}} + \sum_{j=n+1}^\infty \frac{\delta_n h_n}{z^{j+1}} \right].$$

I can see some similarities with the result we wish to prove but at the same time I think I am quite far away. I don't know how to simplify this further, thought. 

Thanks for any help in advance.

  [1]: https://math.stackexchange.com/questions/4729181/proving-an-identity-related-related-to-stieltjes-transformation-and-continued-fr
  [2]: https://en.wikipedia.org/wiki/Stieltjes_transformation