A216648 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 without totally balanced proper prefixes such that all consecutive totally balanced substrings are in nondecreasing order; n>=1, 1<=k<=A000081(n).
2, 12, 52, 56, 212, 216, 232, 240, 852, 856, 872, 880, 920, 936, 944, 976, 992, 3412, 3416, 3432, 3440, 3480, 3496, 3504, 3536, 3552, 3688, 3696, 3752, 3760, 3792, 3808, 3888, 3920, 3936, 4000, 4032, 13652, 13656, 13672, 13680, 13720, 13736, 13744, 13776
Offset: 1
Examples
856 is element of row 5, the binary string representation (with totally balanced substrings enclosed in parentheses) is (1(10)(10)(1(10)0)0). The encoded rooted tree is: . o . /|\ . o o o . | . o Triangle T(n,k) begins: 2; 12; 52, 56; 212, 216, 232, 240; 852, 856, 872, 880, 920, 936, 944, 976, 992; 3412, 3416, 3432, 3440, 3480, 3496, 3504, 3536, 3552, 3688, 3696, ... Triangle T(n,k) in binary: 10; 1100; 110100, 111000; 11010100, 11011000, 11101000, 11110000; 1101010100, 1101011000, 1101101000, 1101110000, 1110011000, ... 110101010100, 110101011000, 110101101000, 110101110000, 110110011000, ...
Links
- Alois P. Heinz, Rows n = 1..12, flattened
Crossrefs
Programs
-
Maple
F:= proc(n) option remember; `if`(n=1, [10], sort(map(h-> parse(cat(1, sort(h)[], 0)), g(n-1, n-1)))) end: g:= proc(n, i) option remember; `if`(i=1, [[10$n]], [seq(seq(seq( [seq (F(i)[w[t]-t+1], t=1..j),v[]], w=combinat[choose]( [$1..nops(F(i))+j-1], j)), v=g(n-i*j, i-1)), j=0..n/i)]) end: b:= proc(n) local h, i, r; h, r:= n, 0; for i from 0 while h>0 do r:= r+2^i*irem(h, 10, 'h') od; r end: T:= proc(n) option remember; map(b, F(n))[] end: seq(T(n), n=1..7);
Formula
T(n,k) = A216649(n-1,k)*2 + 2^(2*n-1) for n>1.
Comments