TITLE: Closed form of factorial and cascading power sum
QUESTION [10 upvotes]: Consider the following sum:
$$ \sum_{i =0}^{j} \left( \frac{(j-i)^ix^i \ln(x)^{(j-i)}\ln(x)^i}{(j-i)!i!} \right) $$ 
I can simplify the sum to:
$$ \ln(x)^j\sum_{i =0}^{j} \left( \frac{(j-i)^ix^i}{(j-i)!i!} \right) $$ 
Furthermore I can observe that 
$$ \frac{1}{(j-i)!(i!)}  = \frac{1}{j!} \begin{pmatrix} j \\ i\end{pmatrix} $$
Thus:
$$ \frac{\ln(x)^j}{j!}\sum_{i =0}^{j} \left( \begin{pmatrix}j \\ i \end{pmatrix}(j-i)^ix^i \right) $$ 
But I don't know how to go in for the kill.

REPLY [3 votes]: Let us write $y=\ln x$. The question is equivalent to compute 
$$a_j(x)=\sum_{i=0}^j\frac{(j-i)^i\;x^i}{(j-i)!\;i!}.$$
An elegant method is to use, as already said, the generating function
$$f(x,y)=\sum_{j=0}^\infty a_j(x) y^j=\sum_{j=0}^\infty y^j\sum_{i=0}^j \frac{(j-i)^i}{(j-i)!}\frac{x^i}{i!}.$$
Using the little diagram 
$$j\uparrow \begin{array}{cccc}\bullet&\bullet&\bullet&\bullet\\
\bullet&\bullet&\bullet&\\
\bullet&\bullet&&\\
\bullet&&&\\&\overrightarrow{i}&&\end{array}$$
we can swap the sums as follows 
$$\sum_{j=0}^\infty\sum_{i=0}^j=\sum_{i=0}^\infty\sum_{j=i}^\infty,$$ and obtain, after setting $k=j-i$
$$f(x,y)=\sum_{i=0}^\infty\sum_{k=0}^\infty \frac{k^ix^iy^i}{i!}\frac{y^k}{k!}.$$
Performing the sum over $i$ first we obtain $f(x,y)=\sum_k\exp(xyk)\frac{y^k}{k!}$ and easily get the final result
$$f(x,y)=\exp\left(y\mathrm{e}^{xy}\right).$$
We note that if $y=\ln x$, $f(x,\ln x)=x^{x^x}$.
The required result can be expressed as
$$y^j \left[y^j\right]\exp(y\mathrm{e}^{xy}).$$