I am trying to calculate the number of trees (non isomorphic) with $n$ nodes (total including leaves).
I think that there are n! such trees, but I don't know how to prove that.
I know that the number of trees with n internal nodes is a the $(n-1)$th catalan number, so I thought maybe there is a way to deduce from that the number of trees with $n$ total nodes.
another approach will be to look at each level and count the number of possible nodes in each level.
There is a Recursive Algorithm to calculate this:
Link
The definition of Catalan Numbers is: $$C_0 = 1 \text{ and } C_{n+1} = \sum_{i=0}^nC_iC_{n−i} \text{ for } n\ge0$$ which is what the above function simulates.
For example:$$C_3 = C_0 · C_2 + C_1 · C_1 + + C_2 · C_0$$ And the above function calculates:
$$sum=count(0).count(2) + count(1).count(1)+ count(2).count(0)$$