OFFSET
1,5
COMMENTS
The Matula-Goebel number of a rooted tree is the product of primes indexed by the Matula-Goebel numbers of the branches of its root, which gives a bijective correspondence between positive integers and unlabeled rooted trees.
EXAMPLE
The Matula-Goebel number of ((ooo(o))) is 89, and it has 4 leaves and 3 internal nodes, so a(89) = 1.
MATHEMATICA
MGTree[n_]:=If[n==1, {}, MGTree/@Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Count[MGTree[n], {}, {0, Infinity}]-Count[MGTree[n], _[__], {0, Infinity}], {n, 100}]
CROSSREFS
A034781 counts trees by nodes and height.
KEYWORD
sign
AUTHOR
Gus Wiseman, Nov 25 2022
STATUS
approved