A label rooted tree with exactly N nodes is a pleasant tree if and only if:
This is essentially the same question as finding the number of possible binary search trees with n nodes.
The difference is that in this problem the order of the nodes is left subtree < right subtree < current node, instead of left subtree < current node < right subtree in a binary search tree.