A358580 Difference between the number of leaves and the number of internal (non-leaf) nodes in the rooted tree with Matula-Goebel number n.
1, 0, -1, 1, -2, 0, 0, 2, -1, -1, -3, 1, -1, 1, -2, 3, -1, 0, 1, 0, 0, -2, -2, 2, -3, 0, -1, 2, -2, -1, -4, 4, -3, 0, -1, 1, 0, 2, -1, 1, -2, 1, 0, -1, -2, -1, -3, 3, 1, -2, -1, 1, 2, 0, -4, 3, 1, -1, -2, 0, -1, -3, 0, 5, -2, -2, 0, 1, -2, 0, -1, 2, -1, 1, -3
Offset: 1
Keywords
Examples
The Matula-Goebel number of ((ooo(o))) is 89, and it has 4 leaves and 3 internal nodes, so a(89) = 1.
Crossrefs
A034781 counts trees by nodes and height.
Programs
-
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}]
Comments