# How do I evaluate $\sum_{k=1}^nk^pr^k=?$

For this entire post, we have $r\ne1$, $n\in\mathbb N$. For the first half, $p\in\mathbb N$, and at the end $p\in\mathbb Q$.

It is well known that

$$\sum_{k=1}^nr^k=\frac{1-r^{n+1}}{1-r}$$

And

$$\sum_{k=1}^nkr^k=\frac{r-(n+1)r^{n+1}+nr^{n+2}}{(1-r)^2}$$

But how do I evaluate

$$\sum_{k=1}^nk^pr^k=?$$

In closed form. I can see that

$$r\frac d{dr}\sum_{k=1}^nk^pr^k=\sum_{k=1}^nk^{p+1}r^k$$

$$\implies \sum_{k=1}^nk^pr^k=\underbrace{r\frac d{dr}r\frac d{dr}r\frac d{dr}\dots r\frac d{dr}}_p\frac{1-r^{n+1}}{1-r}$$

Though this is not really closed form. Any ideas on how to derive this general formula?

Secondly, how do I evaluate this for some $p\in\mathbb Q$? If I let $p=1/2$, for example, I get

$$\sum_{k=1}^n\sqrt kr^k$$

Though I have no idea how to evaluate it.

• Thanks. CAS yields a 'closed form' in terms of $\texttt{PolyLogarithm}\ \mathrm{Li}$ and $\texttt{LerchPi}\ \Phi$. Namely, $\,\mathrm{Li}_{-p}\left(r\right) - r^{n + 1}\,\,\Phi\left(r,-p,n + 1\right)$ which is easily derived. – Felix Marin Nov 17 '16 at 18:05
• @FelixMarin could you please post as an answer? – Simply Beautiful Art Nov 17 '16 at 20:21

AFAIK there is no closed form. One thing you can do: the sequence $$f(p) = \sum_{k=1}^n k^p r^k$$ has exponential generating function $$g(z) = \sum_{p=0}^\infty \dfrac{f(p) z^p}{p!} = \sum_{k=1}^n (r e^z)^k = \dfrac{(r e^z)^{n+1} - r e^z}{r e^z - 1}$$