OFFSET
1,2
COMMENTS
A rooted tree is a semi-identity tree if the non-leaf branches of the root are all distinct and are themselves semi-identity trees. It is balanced if all leaves are the same distance from the root. The only balanced rooted identity trees are rooted paths.
EXAMPLE
The sequence of all unlabeled balanced rooted semi-identity trees together with their Matula-Goebel numbers begins:
1: o
2: (o)
3: ((o))
4: (oo)
5: (((o)))
7: ((oo))
8: (ooo)
11: ((((o))))
16: (oooo)
17: (((oo)))
19: ((ooo))
21: ((o)(oo))
31: (((((o)))))
32: (ooooo)
53: ((oooo))
57: ((o)(ooo))
59: ((((oo))))
64: (oooooo)
67: (((ooo)))
73: (((o)(oo)))
85: (((o))((oo)))
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
psidQ[n_]:=And[UnsameQ@@DeleteCases[primeMS[n], 1], And@@psidQ/@primeMS[n]];
mgtree[n_]:=If[n==1, {}, mgtree/@primeMS[n]];
Select[Range[100], And[psidQ[#], SameQ@@Length/@Position[mgtree[#], {}]]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 29 2019
STATUS
approved