If $(1+px+x^2)^n=1+a_{1}x+a_{2} x^2+....+a_{2n}x^{2n}$, then prove that $(np-pr)a_{r}=(r+1)a_{r+1}+(r-1-2n)a_{r-1}$ for $1<r<2n$
My try:
I tried putting $r=2$ and solved the problem and verfied the answer.
Then I tried to this for general
First I did was $(np-pr)=\dfrac{(r+1)a_{r+1}}{a_{r}}+\dfrac{(r-1-2n)a_{r-1}}{a_r}$, And i tried to solve coefficient of $x^{r+1}$ divided by coefficeint of $x^r$ but i lead me nowhere.
Any help here is appereciated.
Same kind of problem has been asked here For $(1+x+x^2)^n = A_0 + A_1x + ... + A_{2n}x^{2n}$, prove that $(n-r)A_r + (2n -r+1)A_{r-1} = (r+1)A_{r+1}$ but he is skipping some steps so I can't understand he is saying use induction and I've not studied indunction yet
Let $Q(x) = P(x)^n$. Then, differentiating both parts, we get
$$ P(x) Q'(x) = nQ(x) P'(x). $$
In our case, $Q(x) = a_0+a_1 x+\dots+a_{2n} x^{2n}$ and $P(x) = 1+px+x^2$, so
$$ (1+px+x^2)Q'(x) = n(2x+p)Q(x). $$
Now, extracting the coefficients near $x^r$ in the LHS and RHS, we get
$$ (r+1)a_{r+1} + pra_r + (r-1)a_{r-1} = n(2a_{r-1}+p a_r), $$
which is equivalent to $(r+1)a_{r+1} = (2n-r+1) a_{r-1} + p(n-r) a_r$. $\square$
As you see, this approach allows to easily find P-recursive equations for any base $P(x)$.