TITLE: Is the following invariant of rooted trees a complete invariant?
QUESTION [13 upvotes]: Recall that rooted trees may be generated by starting with a trivial rooted tree (just a vertex), along with the operations of grafting a number of trees (identify their roots) and adding a new vertex to the tree to be a new minimum element. We will call this second operation "leafing".
Now let us define an invariant of rooted trees. If $T$ is a rooted tree, we will denote $P_T(z)$ to be the associated polynomial.

If the number of edges of $T$ is zero, then $P_T(z)=1$.
If $T'$ is the leafing of $T$, then $P_{T'}(z)=(z+1)P(z)+1$.
If $T$ is the grafting of $T_i, i=1\ldots n$, then $P_T(z)=P_{T_1}(z)P_{T_2}(z)\ldots P_{T_n}(z)$.

This polynomial is an isomorphism invariant of rooted trees. My question is

If $P_T=P_{T'}$, are the rooted trees, $T,T"$ isomorphic? If these trees are not isomorphic, what is the smallest counterexample? Any references to this invariant would be appreciated.

REPLY [3 votes]: The number of different values taken by the polynomial is given by
1, 1, 2, 4, 9, 20, 47, 112, 274, 679, 1717, ...
Comparing with the sequence A000081 given by
1, 1, 2, 4, 9, 20, 48, 115, 286, 719, 1842, ...
one can easily see that this is not at all a complete invariant.