TITLE: Coefficients of $p\circ p$ for polynomial $p(x)=\sum_{k=0}^d a_kx^k$
QUESTION [6 upvotes]: Let $p(x)=\sum_{k=0}^d a_kx^k$ be a polynomial of degree $d$. Then
\begin{align*}
(p\circ p)(x) &= \sum_{k=0}^da_k\left(\sum_{j=0}^da_j x^j\right)^k\\[3pt]
&=\sum_{k=0}^d \sum_{\substack{k_0+\cdots+k_d=k\\[3pt]k_0,\dots,k_d\geqslant0}}a_k\frac{k!}{k_0!k_1!\cdots k_d!} x^{k_1+2k_2+3k_3+\cdots+d k_d}\prod_{t=0}^da_t^{k_t}
\end{align*}
by the multinomial theorem.
Is there a nicer way I can express the coefficients of $p\circ p$? Where can I read more about this polynomial and study its properties?

REPLY [2 votes]: Not quite the answer you're looking for, but for fun taking a cubic $p(z) = a_0 + a_1 z + a_2 z^2 + a_3 z^3$, $p(p(z)) = c_0 + \cdots + c_9 z^9$ where:
\begin{align}
c_0 &=  a_{0}^{3} a_{3} + a_{0}^{2} a_{2} + a_{0} a_{1} + a_{0} \\
c_1 &=  3 \, a_{0}^{2} a_{1} a_{3} + 2 \, a_{0} a_{1} a_{2} + a_{1}^{2} \\
c_2 &=  3 \, a_{0} a_{1}^{2} a_{3} + 3 \, a_{0}^{2} a_{2} a_{3} + a_{1}^{2} a_{2} + 2 \, a_{0} a_{2}^{2} + a_{1} a_{2} \\
c_3 &=  a_{1}^{3} a_{3} + 6 \, a_{0} a_{1} a_{2} a_{3} + 3 \, a_{0}^{2} a_{3}^{2} + 2 \, a_{1} a_{2}^{2} + 2 \, a_{0} a_{2} a_{3} + a_{1} a_{3} \\
c_4 &=  3 \, a_{1}^{2} a_{2} a_{3} + 3 \, a_{0} a_{2}^{2} a_{3} + 6 \, a_{0} a_{1} a_{3}^{2} + a_{2}^{3} + 2 \, a_{1} a_{2} a_{3} \\
c_5 &=  3 \, a_{1} a_{2}^{2} a_{3} + 3 \, a_{1}^{2} a_{3}^{2} + 6 \, a_{0} a_{2} a_{3}^{2} + 2 \, a_{2}^{2} a_{3} \\
c_6 &=  a_{2}^{3} a_{3} + 6 \, a_{1} a_{2} a_{3}^{2} + 3 \, a_{0} a_{3}^{3} + a_{2} a_{3}^{2} \\
c_7 &=  3 \, a_{2}^{2} a_{3}^{2} + 3 \, a_{1} a_{3}^{3} \\
c_8 &=  3 \, a_{2} a_{3}^{3} \\
c_9 &=  a_{3}^{4} \\
\end{align}