A caterpillar is a tree in which all the vertices are within a distance $1$ of a central path. (See the Wikipedia article: Caterpillar tree, for an example and some equivalent characterizations).
The number of unlabeled caterpillar trees is given by Sloane's OEIS A005418. For $n\le 6$ all trees are caterpillars so the number of labeled caterpillars with $6$ or fewer nodes is given by $n^{n-2}$.
I would most appreciate a symbolic derivation of a generating function that counts these trees.