# Closed form for sequence A145271

I would like to know if there is a simple formula or method of expanding the expression given by

$\left[g(x) \frac{d}{dx}\right]^n g(x)$

where $n$ is a positive integer, without having to resort to actually carrying out the differentiation. The aim is like that of expanding $(x + y)^n$. For this one, there is a simple formula (goes like combination $n$ take $r$) to obtain each numerical coefficient and each term in the expansion can simply be written without the need to actually carry out the multiplication. One can likewise simply use Pascal's triangle.

Attempt at solution

Ignoring the numerical coefficients, one can simply expand the expression above using Ferrer's diagram. Take for instance, $n = 4$. The corresponding set of Ferrer's diagrams is

\begin{align*} \begin{array}[t]{l} \bigcirc\\ \bigcirc\\ \bigcirc\\ \bigcirc \end{array} \qquad \begin{array}[t]{ll} \bigcirc & \bigcirc\\ \bigcirc\\ \bigcirc\\ \end{array} \qquad \begin{array}[t]{ll} \bigcirc & \bigcirc\\ \bigcirc & \bigcirc \end{array} \qquad \begin{array}[t]{lll} \bigcirc & \bigcirc &\bigcirc\\ \bigcirc \end{array} \qquad \begin{array}[t]{llll} \bigcirc & \bigcirc &\bigcirc&\bigcirc \end{array} \end{align*}

The number of columns of each Ferrer's diagram corresponds to the number of $g$ (or its derivatives) factors plus one for each term in the expansion. Thus, the expansion for $n = 4$ takes the form

$\left[g(x) \frac{d}{dx} \right]^{n=4}g(x) : ( )( ) + ( )( )( ) + ( )( )( ) + ( )( )( )( ) + ( )( )( )( )( )$

The length of each column for a given Ferrer's diagram corresponds to the order of derivatives. We can then improve the schematic relation above as

\begin{align*} \left[g(x) \frac{d}{dx}\right]^{n=4}g(x) &: (g'''')( ) + (g''')(g' )( ) + (g'')(g'')( ) + (g'')(g')(g')( ) + (g')(g')(g')(g')( ) \\ &= g''''() + g'''g'() + g''^2() + g''g'^2() + g'^4() \end{align*}

The remaining factor to fill in () is $g$ to a certain power. For each term, the exponent is simply the sum of orders of derivative of each factor minus the number of factors with derivatives plus 1. For instance, for $g'''g'( )$, the sum of the orders of derivatives is 4 (just count the number of primes) and the number of factors with derivatives is 2. As such, $g'''g'() = g'''g'g^{4 - 2 + 1} = g'''g'g^3$. Similarly, $g''g'^2( ) = g''g'^2g^{4 - 3 + 1} = g''g'^2g^2$ One can then simply write down (ignoring the numerical coefficients) the expansion as

\begin{align*} \left[g(x) \frac{d}{dx} \right]^{n=4}g(x) &: g''''g^4 + g'''g'g^3 + g''^2g^3 + g''g'^2g^2 + g'^4g \end{align*}

The problem now is the coefficient of each term in the expansion. The sequence of coefficients is actually sequence number A145271 (OEIS). For $n = 4$, this sequence is simply $\{1, 7, 4, 11, 1\}$ so that

\begin{align*} \left[g(x) \frac{d}{dx} \right]^{n=4}g(x) &= g''''g^4 + 7g'''g'g^3 + 4g''^2g^3 + 11g''g'^2g^2 + g'^4g \end{align*}

but I cannot find a simple procedure to reproduce this sequence without actually expanding the original expression above through differentiation; hence, this post. Any diagrammatic method, closed form expression, or a null statement (eg., such a closed form expression does not exist) would be greatly appreciated.

[Note: I am not a mathematician and is not very familiar with the area of Combinatorics. I encountered this problem while trying to solve a differential equation in physics.]

There is no simple procedure. Even in the simpler case $\left[x\frac{d}{dx}\right]^n g(x)$, the formula involves the Stirling numbers of the second kind $S(n,k)$ :

$\left[x\frac{d}{dx}\right]^n g(x) = \sum_{k=0}^{n}S(n,k)x^k\frac{d^kg}{dx^k}$

• And there is a lot of literature on Stirling numbers of the 2nd kind (1st kind, too). Jul 8, 2014 at 10:40
• Actually, the simple case with $g(x)=x$ is $(xD_x)^n x=x$. Your case corresponds to A139605 for $(f(x)D_x)^n$, which can be couched in a simple graded matrix computation analogous to the one in my answer with the column vector replaced by $(1,D,D^2,..)^T$. Jul 19, 2016 at 19:36

The OEIS entry A145271 now contains a graded matrix computation for the sequence of partition polynomials, involving Pascal's triangle: Multiply the $$n$$-th diagonal (with $$n=0$$ the main diagonal) of the lower triangular Pascal matrix by $$g_n = D_x^n g(x)$$ to obtain the matrix $$VP$$ with $$VP_{n,k} = \binom{n}{k}g_{n-k}$$. Then $$(g(x)D_x)^n g(x) = (1, 0, 0,..,0) [VP \dot \; S]^n (g_0, g_1, g_2, .., g_n)^T$$, where S is the shift matrix A129185, representing differentiation in the divided powers basis $$x^n/n!$$.

Example:

$$(g(x)D_x)^3 g(x)$$

$$= (1, 0, 0, 0) [VP \dot \; S]^3 (g_0, g_1, g_2, g_3)^T$$

$$= \begin{pmatrix} 1 & 0 & 0 & 0 \end{pmatrix} \begin{pmatrix} 0 & g_0 & 0 & 0 \\ 0 & g_1 & g_0 & 0\\ 0 & g_2 & 2g_1 & g_0 \\ 0 & g_3 & 3g_2 & 3g_1 \end{pmatrix}^3 \begin{pmatrix} g_0 \\ g_1 \\ g_2 \\ g_3 \end{pmatrix}$$

$$= g_0g_1^3 + 4 g_0^2g_1g_2 + g_0^3g_3$$

$$= \begin{pmatrix} 1 & 0 & 0 & 0 \end{pmatrix} \begin{pmatrix} 0 & g_0 & 0 & 0 \\ 0 & g_1 & g_0 & 0\\ 0 & g_2 & 2g_1 & g_0 \\ 0 & g_3 & 3g_2 & 3g_1 \end{pmatrix}^4 \begin{pmatrix} 0 \\ 1 \\ 0 \\ 0 \end{pmatrix}$$

This is related to the partition polynomials characterized by Comtet in the reference in A139605.

And, the pdf Mathemagical Forests gives a diagrammatic method for creating forests of trees through "natural growth" that represent the partition polynomials.

Edit (2019): See an update in MQ-QExpansion of iterated derivatives ... .

• The example also provides the partition polynomials for n=0 to n=2 with only a corresponding change in the exponent. For n=4 an additional columnn and row need to be appended, and so on for n=5,6,.. , giving a graded computation. Jul 19, 2016 at 18:24

A145271, which I authored, contains in the Crossref Section a list of several Lagrange inversion formulas (LIFs) with different reps of $g(x)$ for obtaining the series for the formal compositional inverse of a convergent series, or analytic function, about the origin. These LIFs have nonrecursive formulas for the coefficients of each partition at each order of the series. To convert from any of these expressions to the partitions of A145271, you can use either A133314 (signed A049019) or A263633, which have explicit multinomial formulas that can be gleaned from one in A049019.

For example, to find the inverse series for $f(x)$ with $f(0) = 0$ and $f'(0)=1,$ the classic LIF A134685 can be used with

$$g(x) = 1/f'(x)= 1 / [1 + f_2 x + f_3 \frac{x^2}{2!} + ...],$$

so

$$1 + f_2 x + f_3 \frac{x^2}{2!} + ... = 1 / [1 + g_1 x + g_2 \frac{x^2}{2!} + ...]$$

with $f_n$ given by A133314 with $b_n = f^{(n+1)}(0) = f_{n+1}$ and $a_n = g_n$.

Then the first few coefficients of the reciprocal are

$$f_1 = g_0 = 1$$ $$f_2 = -g_1$$ $$f_3 = -g_2 + 2g_1^2$$ $$f_4 = -g_3 + 6g_2g_1 - 6 g_1^3.$$

Plugging these expressions into A134685 for, say, the third order term gives

$$3f_2^2 - f_3 = 3g_1^2 + g_2 - 2g_1^2= g_1^2 + g_2$$

in agreement with A145271.

• Note that you need only generate the partitions/monomials at an order of the LIF expansion as described in the pdf A Short Note on Lagrange Inversion (link in A134685) and then generate the numerical coefficient for each partition/monomial at that order from the formula given in that entry and the pdf. Similarly for the reciprocal A133314 (A049019). The numerical coefficients are explicitly given (nonrecursively ) for each partition/monomial for the LIF and the reciprocal. Aug 22, 2018 at 1:16
• Mar 4, 2020 at 19:51