# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a358550 Showing 1-1 of 1 %I A358550 #7 Nov 22 2022 11:57:59 %S A358550 1,2,2,3,2,3,3,3,4,2,3,3,3,4,3,3,3,3,4,4,4,4,5,2,3,3,3,4,3,3,3,3,4,4, %T A358550 4,4,5,3,3,3,3,4,3,3,3,3,4,4,4,4,5,4,4,4,4,4,4,4,4,5,5,5,5,5,6,2,3,3, %U A358550 3,4,3,3,3,3,4,4,4,4,5,3,3,3,3,4,3,3,3 %N A358550 Depth of the ordered rooted tree with binary encoding A014486(n). %C A358550 The binary encoding of an ordered tree (A014486) is obtained by replacing the internal left and right brackets with 0's and 1's, thus forming a binary number. %e A358550 The first few rooted trees in binary encoding are: %e A358550 0: o %e A358550 2: (o) %e A358550 10: (oo) %e A358550 12: ((o)) %e A358550 42: (ooo) %e A358550 44: (o(o)) %e A358550 50: ((o)o) %e A358550 52: ((oo)) %e A358550 56: (((o))) %e A358550 170: (oooo) %e A358550 172: (oo(o)) %e A358550 178: (o(o)o) %e A358550 180: (o(oo)) %e A358550 184: (o((o))) %t A358550 binbalQ[n_]:=n==0||Count[IntegerDigits[n,2],0]==Count[IntegerDigits[n,2],1]&&And@@Table[Count[Take[IntegerDigits[n,2],k],0]<=Count[Take[IntegerDigits[n,2],k],1],{k,IntegerLength[n,2]}]; %t A358550 bint[n_]:=If[n==0,{},ToExpression[StringReplace[StringReplace[ToString[IntegerDigits[n,2]/.{1->"{",0->"}"}],","->""],"} {"->"},{"]]]; %t A358550 Table[Depth[bint[k]]-1,{k,Select[Range[0,1000],binbalQ]}] %Y A358550 Positions of first appearances are A014137. %Y A358550 Leaves of the ordered tree are counted by A057514, standard A358371. %Y A358550 Branches of the ordered tree are counted by A057515. %Y A358550 Edges of the ordered tree are counted by A072643. %Y A358550 The Matula-Goebel number of the ordered tree is A127301. %Y A358550 Positions of 2's are A155587, indices of A020988. %Y A358550 The standard ranking of the ordered tree is A358523. %Y A358550 Nodes of the ordered tree are counted by A358551, standard A358372. %Y A358550 For standard instead of binary encoding we have A358379. %Y A358550 A000108 counts ordered rooted trees, unordered A000081. %Y A358550 A014486 lists all binary encodings. %Y A358550 Cf. A001263, A057122, A358373, A358505, A358524. %K A358550 nonn %O A358550 1,2 %A A358550 _Gus Wiseman_, Nov 22 2022 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE