How to calculate the sum $\sum_{i=0}^\infty i^nx^i$ Here I have $x\in\mathbb{R}_+$ and $x < 1$.
I would like to evaluate the following sum:
$$\sum_{i=0}^\infty i^nx^i.$$
I know that $$\sum_{i=0}^\infty x^i=\dfrac{1}{1-x}.$$
So I started calculating the derivative of the above formula. I found something like:
$$\sum_{i=0}^\infty i^nx^i=\dfrac{P_n(x)}{(1-x)^{n+1}},$$
where $P_n(x)$ is a polynomial of degree $n$.
$$P_0(x)=1,$$
$$P_1(x)=x,$$
$$P_2(x)=x+x^2,$$
$$P_3(x)=x+4x^2+x^3,$$
$$P_4(x)=x+11x^2+11x^3+x^4,$$
$$P_4(x)=x+26x^2+66x^3+26x^4+x^5,$$
$$\cdots.$$
Is there a general formula for $P_n(x)$?
 A: The coefficients of $P_n(x)$ are called the Eulerian numbers and there is a corresponding Euler's triangle. They satisfy
$$
\genfrac{\langle}{\rangle}{0}{}{n}{k} = (k+1)\genfrac{\langle}{\rangle}{0}{}{n-1}{k}+(n-k)\genfrac{\langle}{\rangle}{0}{}{n-1}{k-1},
$$
for integer $n>0$ as well as
$$
\genfrac{\langle}{\rangle}{0}{}{n}{k}=\genfrac{\langle}{\rangle}{0}{}{n}{n-1-k}
$$
A: Suppose
$p_n(x)
=\sum_{i=0}^\infty i^nx^i
$.
Then
$p_n'(x)
=\sum_{i=0}^\infty i^{n+1}x^{i-1}
$
so
$x p_n'(x)
=\sum_{i=0}^\infty i^{n+1}x^i
=p_{n+1}(x)
$.
Since
$p_0(x)
=\frac1{1-x}
$,
$p_1(x)
=\frac{x}{(1-x)^2}
$.
This leads to the conjecture that
$p_n(x)
=\frac{q_n(x)}{(1-x)^{n+1}}
$
for some polynomial $q_n$.
$\begin{array}\\
p_n'(x)
&=\left(\frac{q_n(x)}{(1-x)^{n+1}}\right)'\\
&=\frac{q_n'(x)(1-x)^{n+1}-q_n(x)(n+1)(1-x)^{n}}{(1-x)^{2n+2}}\\
&=\frac{q_n'(x)(1-x)-q_n(x)(n+1)}{(1-x)^{n+2}}\\
\end{array}
$
so that
$q_{n+1}(x)
=x p_n'(x)(1-x)^{n+1}
=x(q_n'(x)(1-x)-q_n(x)(n+1))
$
and this is a
polynomial of degree one higher
than $q_n(x)$.
The next step
is to see how the
coefficients of
$q_{n+1}$ are gotten from
those of $q_n$.
When you do this.
you will get the recurrence
that kodlu has
in his answer.
As in many of my answers,
nothing original here.
