|
|
A358551
|
|
Number of nodes in the ordered rooted tree with binary encoding A014486(n).
|
|
2
|
|
|
1, 2, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
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.
|
|
LINKS
|
Table of n, a(n) for n=1..87.
|
|
FORMULA
|
a(n) = A072643(n) + 1.
|
|
EXAMPLE
|
The first few rooted trees in binary encoding are:
0: o
2: (o)
10: (oo)
12: ((o))
42: (ooo)
44: (o(o))
50: ((o)o)
52: ((oo))
56: (((o)))
170: (oooo)
172: (oo(o))
178: (o(o)o)
180: (o(oo))
184: (o((o)))
|
|
MATHEMATICA
|
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]}];
bint[n_]:=If[n==0, {}, ToExpression[StringReplace[StringReplace[ToString[IntegerDigits[n, 2]/.{1->"{", 0->"}"}], ", "->""], "} {"->"}, {"]]];
Table[Count[bint[k], _, {0, Infinity}], {k, Select[Range[0, 10000], binbalQ]}]
|
|
CROSSREFS
|
Run-lengths are A000108.
Binary encodings are listed by A014486.
Leaves of the ordered tree are counted by A057514, standard A358371.
Branches of the ordered tree are counted by A057515.
Edges of the ordered tree are counted by A072643.
The Matula-Goebel number of the ordered tree is A127301.
For standard instead of binary encoding we have A358372.
The standard ranking of the ordered tree is A358523.
Depth of the ordered tree is A358550, standard A358379.
Cf. A000081, A001263, A057122, A358373, A358505, A358524.
Sequence in context: A029133 A255402 A230411 * A358372 A029128 A303660
Adjacent sequences: A358548 A358549 A358550 * A358552 A358553 A358554
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Gus Wiseman, Nov 22 2022
|
|
STATUS
|
approved
|
|
|
|