OFFSET
1,3
COMMENTS
Node-height is the number of nodes in the longest path from root to leaf.
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 tree (oo(oo(o))) with Matula-Goebel number 148 has node-height 4 and 5 leaves, so a(148) = -1.
MATHEMATICA
MGTree[n_]:=If[n==1, {}, MGTree/@Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[(Depth[MGTree[n]]-1)-Count[MGTree[n], {}, {0, Infinity}], {n, 1000}]
CROSSREFS
Positions of 0's are A358577.
KEYWORD
sign
AUTHOR
Gus Wiseman, Nov 29 2022
STATUS
approved