In my last question, it turns out to be solving the formula of $\sum_{k=1}^{n}k\omega^k$. I am curious if there is a geranal formula for the power sum: $$\sum_{k=1}^{n}k^mx^k\quad \forall\; m\in \mathbb{N}$$ I have calculated first few formula. \begin{align} \sum_{k=1}^{n}x^k&=\frac{x}{x-1}(x^n-1)\\ \sum_{k=1}^{n}kx^k&=\frac{x}{x-1}\left(x^n\left(n-\frac{1}{x-1}\right)+\frac{1}{x-1}\right)\\ \sum_{k=1}^{n}k^2x^k&=\frac{x}{x-1}\left(x^n\left(n^2-\frac{2n-1}{x-1}+\frac{2}{(x-1)^2}\right)-\left(\frac{1}{x-1}+\frac{2}{(x-1)^2}\right)\right)\\ \sum_{k=1}^{n}k^3x^k&=\frac{x}{x-1}\left(x^n\left(n^3-\frac{3n^2-3n+1}{x-1}+\frac{6n-6}{(x-1)^2}-\frac{6}{(x-1)^3}\right)+\left(\frac{1}{x-1}+\frac{6}{(x-1)^2}+\frac{6}{(x-1)^3}\right)\right) \end{align} The formula has a common form. $$ \sum_{k=1}^{n}k^mx^k=\frac{x}{x-1}\left(x^nf_m\left(\frac{1}{x-1}\right)-\left.f_m\left(\frac{1}{x-1}\right)\right|_{n=0}\right)\\ f_m \text{ is a polynomial of } \frac{1}{x-1} $$
It seems there are some rules for $f_m\left(\frac{1}{x-1}\right)$when $m$ increased. For example:
The constant term coefficient of $f_m\left(\frac{1}{x-1}\right)$ is $\;n^m$.
The $\frac{1}{x-1}$ term coefficient of $f_m\left(\frac{1}{x-1}\right)$ is $\;(n-1)^m-n^m$.
The $\frac{1}{(x-1)^m}$ term coefficient of $f_m\left(\frac{1}{x-1}\right)$ is $\;(-1)^mm!$.
I also find a recursive formula for the power sum. $$\sum_{k=1}^{n}k^{m+2}x^k=\sum_{k=1}^{n}k^{m+1}x^k+n(n+1)\sum_{k=1}^{n}k^mx^k-\sum_{k=1}^{n}\left(2k\sum_{j=1}^{k}j^mx^j\right)$$ Then the formula of $(m+2)^{th}$ order can always be calculated from previous two formula of $(m+1)^{th}$ order and $m^{th}$ order.
I have calculated the formula up to $6^{th}$ order, but the calculations become extremely complex and tedious when the order increased.
The term $$\sum_{k=1}^{n}\left(2k\sum_{j=1}^{k}j^mx^j\right)$$ will be expanded to all the formula from order $1$ to order $m+1$, and each formula times a polynomial of $\frac{1}{x-1}$.
Is there a general formula like Faulhaber's formula to calculate the coefficients of the formula for this power sum in a easier way?