%I #13 Jan 10 2015 11:10:41
%S 2,10,12,42,44,52,56,170,172,180,184,204,212,216,232,240,682,684,692,
%T 696,716,724,728,744,752,820,824,852,856,872,880,920,936,944,976,992,
%U 2730,2732,2740,2744,2764,2772,2776,2792,2800,2868,2872,2900,2904,2920,2928
%N Triangle T(n,k) in which n-th row lists in increasing order all positive integers with a representation as totally balanced 2n digit binary string such that all consecutive totally balanced substrings are in nondecreasing order; n>=1, 1<=k<=A000081(n+1).
%C There is a simple bijection between the elements of row n and the rooted trees with n+1 nodes. The tree has a root node. Each matching pair (1,0) in the binary string representation encodes an additional node, the totally balanced substrings encode lists of subtrees.
%H Alois P. Heinz, <a href="/A216649/b216649.txt">Rows n = 1..11, flattened</a>
%F T(n,k) = A216648(n+1,k)/2 - 2^(2*n).
%e 172 is element of row 4, the binary string representation (with totally balanced substrings enclosed in parentheses) is (10)(10)(1(10)0). The encoded rooted tree is:
%e . o
%e . /|\
%e . o o o
%e . |
%e . o
%e Triangle T(n,k) begins:
%e 2;
%e 10, 12;
%e 42, 44, 52, 56;
%e 170, 172, 180, 184, 204, 212, 216, 232, 240;
%e 682, 684, 692, 696, 716, 724, 728, 744, 752, 820, 824, ...
%e 2730, 2732, 2740, 2744, 2764, 2772, 2776, 2792, 2800, 2868, 2872, ...
%e Triangle T(n,k) in binary:
%e 10;
%e 1010, 1100;
%e 101010, 101100, 110100, 111000;
%e 10101010, 10101100, 10110100, 10111000, 11001100, 11010100, ...
%e 1010101010, 1010101100, 1010110100, 1010111000, 1011001100, 1011010100, ...
%p F:= proc(n) option remember; `if`(n=1, [10], sort(map(h->
%p parse(cat(1, sort(h)[], 0)), g(n-1, n-1)))) end:
%p g:= proc(n, i) option remember; `if`(i=1, [[10$n]], [seq(seq(seq(
%p [seq (F(i)[w[t]-t+1], t=1..j),v[]], w=combinat[choose](
%p [$1..nops(F(i))+j-1], j)), v=g(n-i*j, i-1)), j=0..n/i)])
%p end:
%p b:= proc(n) local h, i, r; h, r:= n/10, 0; for i from 0
%p while h>1 do r:= r+2^i*irem(h, 10, 'h') od; r
%p end:
%p T:= proc(n) option remember; map(b, F(n+1))[] end:
%p seq(T(n), n=1..6);
%Y First column gives: A020988.
%Y Last elements of rows give: A020522.
%Y Row lengths are: A000081(n+1).
%Y Subsequence of A014486, A031443.
%Y Cf. A061773, A216349, A216350, A216648.
%K nonn,tabf
%O 1,1
%A _Alois P. Heinz_, Sep 12 2012