OFFSET
1,2
LINKS
EXAMPLE
The sequence of all planted achiral trees begins: o, (o), (oo), ((o)), (ooo), ((oo)), (oooo), (((o))), ((o)(o)), ((ooo)), (ooooo), (((oo))), (oooooo), ((oooo)), ((((o)))), (ooooooo), (((o)(o))), (oooooooo), (((ooo))), ((oo)(oo)).
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
ptnToAch[y_]:=Fold[Table[#1, {#2}]&, {}, Divide@@@Partition[Append[y, 1], 2, 1]];
MGNumber[_[]]:=1; MGNumber[x:_[__]]:=If[Length[x]==1, Prime[MGNumber[x[[1]]]], Times@@Prime/@MGNumber/@x];
MGNumber/@ptnToAch/@Reverse/@primeMS/@Select[Range[100], Or[#==1, PrimeQ[#], Divisible@@Reverse[primeMS[#]]]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 06 2018
STATUS
approved