%I #11 Oct 10 2024 17:50:26
%S 1,2,4,3,8,5,6,4,16,8,9,6,12,7,8,5,32,13,15,9,18,11,11,7,24,11,12,8,
%T 16,9,10,6,64,21,25,13,27,16,17,10,36,17,16,11,21,12,13,8,48,18,21,12,
%U 24,15,14,9,32,14,15,10,20,11,12,7
%N Number T(n,k) of binary words of length n avoiding distance (i+1) between "1" digits if the i-th bit is set in the binary representation of k; triangle T(n,k), n>=0, 0<=k<=ceiling(2^(n-1))-1, read by rows.
%C For more information see A376033.
%H Alois P. Heinz, <a href="/A376921/b376921.txt">Rows n = 0..16, flattened</a>
%e Triangle T(n,k) begins:
%e 1;
%e 2;
%e 4, 3;
%e 8, 5, 6, 4;
%e 16, 8, 9, 6, 12, 7, 8, 5;
%e 32, 13, 15, 9, 18, 11, 11, 7, 24, 11, 12, 8, 16, 9, 10, 6;
%e ...
%p h:= proc(n) option remember; `if`(n=0, 1, 2^(1+ilog2(n))) end:
%p b:= proc(n, k, t) option remember; `if`(n=0, 1, add(`if`(j=1 and
%p Bits[And](t, k)>0, 0, b(n-1, k, irem(2*t+j, h(k)))), j=0..1))
%p end:
%p T:= (n, k)-> b(n, k, 0):
%p seq(seq(T(n, k), k=0..ceil(2^(n-1))-1), n=0..7);
%Y Cf. A376033.
%K nonn,tabf
%O 0,2
%A _Alois P. Heinz_, Oct 10 2024