comparing two equations and obtaining some results Assuming the following equation
$$
\sum_{m=0}^M b_m r^m \left[\sum_{i,j}i j\lambda_i \lambda_j r^{i+j-2}-\sum_j j(j+1) \lambda_j r^{j-2}+2E\right]-2\sum_{k=0}^K a_k r^k=0 \tag{1}
$$
the authors in a paper says that 

Equating the coefficients of $r^p, p=0, 1, 2, . . .$ in (1) to zero,
  we get a set of relations connecting $\lambda_n$s. For example, in a
  case where M=1 and K=3, these are:

$$
\lambda_1=Z; \\
\lambda_2=(2E+\lambda^2_1)/6; \\
\lambda_3=(2\lambda_1 \lambda_2-\alpha)/6;\\
\lambda_4=(4\lambda_2^2+6\lambda_1 \lambda_3-2\beta)/20;\\
\lambda_n=\frac 1 {n(n+1)}\sum_{i=1}^{n-1}i (n-i)\lambda_i \lambda_{n-1}, n>4;\\
\tag{2}
$$
In fact they have obtained an expression for this special potential in the previous section as follows (before they write $\Psi$ as a sum, see this question)
$$
n(n-1)\mu_{n-1}+2Z\mu_n+2E\mu_{n+1}-2\alpha\mu_{n+2}-2\beta\mu_{n+3}=0 \tag{3}
$$
where 
$$
\mu_j=\int_0^\infty r^j \Psi(r)dr \tag{4}
$$
this is while after writing $\Psi$ as a sum they define 
$$
\int_0^\infty r^p exp[-S(r)]dr=\mu_p,  \,\,  p=0,1,2,...,N \tag{5}
$$

I can't understand how they have reached equation (2) by comparison equations (1) and (3)? or  if they have reached it in another way! Any idea?

You can find more details in the original paper. Of course I have cropped the relevant parts. In this question I want to know how authors have reached from equation (11) to (12) in the paper.
 A: We start with the  representation given in the answer of the referred post which corresponds to (1).
\begin{align*}
\sum_{m=0}^M b_m r^m\left[\color{blue}{\sum_{n=2}^{2N}}\sum_{{i+j=n}\atop{i,j\geq   1}}ij\lambda_i   \lambda_jr^{i+j-2}-\sum_{j=1}^Nj(j+1)\lambda_jr^{j-2}+2E\right]
-2\sum_{k=0}^K a_k r^k=0\tag{1a}
\end{align*}
Note: The blue marked sum is not given in formula (11) of the original paper, which seems to be a typo.
The relations (2) stated by OP are derived in the referred paper by specialisation of (1a) to the so-called spherical Stark–Zeeman hydrogenic problem . We consider in the referred paper formula (6):
\begin{align*}
V(r)=\frac{\sum_{k=0}^Ka_kr^k}{\sum_{m=0}^Mb_mr^m}=\frac{-Z+\alpha r^2+\beta r^3}{r}\tag{2a}
\end{align*}
Combining (1a) and (2a) we obtain
\begin{align*}
&r\left[\sum_{n=2}^{2N}\sum_{{i+j=n}\atop{i,j\geq   1}}ij\lambda_i   \lambda_jr^{i+j-2}-\sum_{j=1}^Nj(j+1)\lambda_jr^{j-2}+2E\right]
-2\left(-Z+\alpha r^2+\beta r^3\right)=0\tag{3a}
\end{align*}

We obtain from (3a)
\begin{align*}
&\color{blue}{2\left(-Z-Er+\alpha r^2+\beta r^3\right)}\tag{4a}\\
&\qquad=\sum_{n=2}^{2N}\sum_{{i+j=n}\atop{i,j\geq   1}}ij\lambda_i   \lambda_jr^{n-1}-\sum_{j=1}^Nj(j+1)\lambda_jr^{j-1}\\
&\qquad=\sum_{n=2}^{2N}\sum_{j=1}^{n-1}j(n-j)\lambda_j\lambda_{n-j}r^{n-1}-\sum_{j=1}^Nj(j+1)\lambda_jr^{j-1}\tag{5a}\\
&\qquad\,\,\color{blue}{=\sum_{n=1}^{2N-1}\sum_{j=1}^{n}j(n+1-j)\lambda_j\lambda_{n+1-j}r^{n}-\sum_{j=0}^{N-1}(j+1)(j+2)\lambda_{j+1}r^{j}}\tag{6a}\\
\end{align*}

Comment:

*

*In (5a) we eliminate $i$ using $i=n-j$.


*In (6a) we shift the indices $n$ and $j$ to ease coefficient comparison of $r^p, p\geq 0$.

Coefficient  comparison of (4a) and (6a) gives:
\begin{align*}
-2Z&=-1\cdot2\lambda_1\tag{$[r^0]$}\\
\color{blue}{Z}&\color{blue}{=\lambda_1}\\
\\
-2E&=\sum_{j=1}^1j(2-j)\lambda_j\lambda_{2-j}-2\cdot3\lambda_2\tag{$[r^1]$}\\
-2E&=\lambda_1^2-6\lambda_2\\
\color{blue}{\lambda_2}&\color{blue}{=\frac{1}{6}\left(2E+\lambda_1^2\right)}\\
\\
2\alpha&=\sum_{j=1}^2j(3-j)\lambda_j\lambda_{3-j}-3\cdot 4\lambda_3\tag{$[r^2]$}\\
2\alpha&=2\lambda_1\lambda_2+2\lambda_2\lambda_1-12\lambda_3\\
2\alpha&=4\lambda_1\lambda_2-12\lambda_3\\
\color{blue}{\lambda_3}&\color{blue}{=\frac{1}{6}\left(2\lambda_1\lambda_2-\alpha\right)}
\end{align*}
The  other relations  follow  similarly.

