login
A376921
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.
2
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, 16, 9, 10, 6, 64, 21, 25, 13, 27, 16, 17, 10, 36, 17, 16, 11, 21, 12, 13, 8, 48, 18, 21, 12, 24, 15, 14, 9, 32, 14, 15, 10, 20, 11, 12, 7
OFFSET
0,2
COMMENTS
For more information see A376033.
LINKS
EXAMPLE
Triangle T(n,k) begins:
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, 16, 9, 10, 6;
...
MAPLE
h:= proc(n) option remember; `if`(n=0, 1, 2^(1+ilog2(n))) end:
b:= proc(n, k, t) option remember; `if`(n=0, 1, add(`if`(j=1 and
Bits[And](t, k)>0, 0, b(n-1, k, irem(2*t+j, h(k)))), j=0..1))
end:
T:= (n, k)-> b(n, k, 0):
seq(seq(T(n, k), k=0..ceil(2^(n-1))-1), n=0..7);
CROSSREFS
Cf. A376033.
Sequence in context: A321366 A180246 A329146 * A246367 A367263 A048167
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, Oct 10 2024
STATUS
approved