Equalizing of powers in power series solution method I have reached to the following equation using power series solution method 
$$
\sum_{i=0}^p(i+1)\,a_i\,r^{i+1}+\sum_{i=0}^pa_i\,r^i+\sum_{i=0}^p(i+2)\,a_i\,r^{i-1}=0
$$
I really don't know what should I do to equalize the powers. Do limits of summations change during this process? and if yes, how?
 A: $$\sum_{i=0}^p(i+1)\,a_i\,r^{i+1}+\sum_{i=0}^pa_i\,r^i+\sum_{i=0}^p(i+2)\,a_i\,r^{i-1}=0$$
For each term, make the power equal to $k$ to get the required $i$. 
So, for the first term, $i+1=k\implies i=k-1$, for the second $i=k$ and for the third, $i-1=k\implies i=k+1$.
Rewriting
$$ka_{k-1}+a_k+(k+3)a_{k+1}=0$$
Edit
I made a mistake assuming that the summations are going to $\infty$. Since, from comments, this is not the case, we must be more careful.
The terms will be
$$\frac{2a_0} x+(a_0+3a_1)+\sum_{k=1}^{p-1}\big(ka_{k-1}+a_k+(k+3)a_{k+1}\big)x^k+(pa_{p-1}+a_p)x^{p}+(p+1)a_p x^{p+1}$$ But this then implies $a_p=a_{p-1}=0$ as well as $a_0=a_1=0$. Then, this reduces the problem of
$$\sum_{i=1}^{p-2}(i+1)\,a_i\,r^{i+1}+\sum_{i=1}^{p-2} a_i\,r^i+\sum_{i=1}^{p-2}(i+2)\,a_i\,r^{i-1}=0$$ to which apply
$$ka_{k-1}+a_k+(k+3)a_{k+1}=0$$
A: 
We shift indices of  the series to easily collect coefficients of equal powers of $r$. We obtain for integral  $p\geq        0$:
  \begin{align*}
\sum_{i=0}^p&(i+1)a_ir^{i+1}+\sum_{i=0}^pa_ir^i+\sum_{i=0}^p(i+2)a_ir^{i-1}\\
&=\sum_{i=1}^{p+1}ia_{i-1}r^i+\sum_{i=0}^pa_ir^i+\sum_{i=-1}^{p-1}(i+3)a_{i+1}r^i=0\tag{1}
\end{align*}

In (1) we shift the index of the left-most sum by $+1$ and of the right-most sum  by $-1$ to obtain equal powers $r^i$. 

We obtain by collecting coefficients of equal powers from (1):
  \begin{align*}
\sum_{i=-1}^{-1}&(i+3)a_{i+1}r^i+\sum_{i=0}^0a_ir^i+\sum_{i=1}^1ia_{i-1}r^i\tag{$p=0$}\\
&=2a_0\frac{1}{r}+a_0+a_0r\\
&=0\\
\sum_{i=-1}^{0}&(i+3)a_{i+1}r^i+\sum_{i=0}^1a_ir^i+\sum_{i=1}^2ia_{i-1}r^i\tag{$p=1$}\\
&=\left(2a_0\frac{1}{r}+3a_0\right)+\left(a_0+a_1r\right)+\left(a_0r+2a_1r^2\right)\\
&=2a_0\frac{1}{r}+4a_0+(a_0+a_1)r+2a_1r^2\\
&=0\\
\sum_{i=-1}^{p-1}&(i+3)a_{i+1}r^i+\sum_{i=0}^pa_ir^i+\sum_{i=1}^{p+1}ia_{i-1}r^i\tag{$p\geq  2$}\\
&=2a_0\frac{1}{r}+3a_1+a_0+\sum_{i=1}^{p-1}\left(ia_{i-1}+a_i+(i+3)a_{i+1}\right)r^i\\
&\qquad+\left((p-1)a_{p-1}+a_{p}\right)r^p+(p+1)a_pr^{p+1}\\
&=0
\end{align*}
We observe that only the trivial solutions $a_j=0, j\geq 0$ occur for each $p\geq 0$.

In  the case $p\geq 2$ we separated the terms  with $i\in\{-1,0,p,p+1\}$ and collected the other terms within one sum.
