login
Least number k such that the k-th standard ordered tree has Matula-Goebel number n, i.e., A358506(k) = n.
4

%I #6 Nov 20 2022 18:30:16

%S 1,2,3,4,5,6,9,8,11,10,17,12,33,18,19,16,257,22,129,20,35,34,1025,24,

%T 37,66,43,36,513,38,65537,32,67,514,69,44,2049,258,131,40

%N Least number k such that the k-th standard ordered tree has Matula-Goebel number n, i.e., A358506(k) = n.

%C We define the n-th standard ordered rooted tree to be obtained by taking the (n-1)-th composition in standard order (graded reverse-lexicographic, A066099) as root and replacing each part with its own standard ordered rooted tree. This ranking is an ordered variation of Matula-Goebel numbers, giving a bijective correspondence between positive integers and unlabeled ordered rooted trees.

%C 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.

%H Gus Wiseman, <a href="https://docs.google.com/document/d/e/2PACX-1vTCPiJVFUXN8IqfLlCXkgP15yrGWeRhFS4ozST5oA4Bl2PYS-XTA3sGsAEXvwW-B0ealpD8qnoxFqN3/pub">Statistics, classes, and transformations of standard compositions</a>

%e The terms together with their standard ordered trees begin:

%e 1: o

%e 2: (o)

%e 3: ((o))

%e 4: (oo)

%e 5: (((o)))

%e 6: ((o)o)

%e 9: ((oo))

%e 8: (ooo)

%e 11: ((o)(o))

%e 10: (((o))o)

%e 17: ((((o))))

%e 12: ((o)oo)

%e 33: (((o)o))

%e 18: ((oo)o)

%e 19: (((o))(o))

%e 16: (oooo)

%e 257: (((oo)))

%e 22: ((o)(o)o)

%e 129: ((ooo))

%e 20: (((o))oo)

%e 35: ((oo)(o))

%e 34: ((((o)))o)

%t stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;

%t srt[n_]:=If[n==1,{},srt/@stc[n-1]];

%t mgnum[t_]:=If[t=={},1,Times@@Prime/@mgnum/@t];

%t uv=Table[mgnum[srt[n]],{n,10000}];

%t Table[Position[uv,k][[1,1]],{k,Min@@Complement[Range[Max@@uv],uv]-1}]

%Y Position of first appearance of n in A358506.

%Y The sorted version is A358521.

%Y A000108 counts ordered rooted trees, unordered A000081.

%Y A214577 and A358377 rank trees with no permutations.

%Y Cf. A001263, A014486, A061775, A127301, A196050, A206487, A358371, A358372, A358378, A358379, A358505.

%K nonn,more

%O 1,2

%A _Gus Wiseman_, Nov 20 2022