cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A376921 #11 Oct 10 2024 17:50:26
%S A376921 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 A376921 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 A376921 24,15,14,9,32,14,15,10,20,11,12,7
%N 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.
%C A376921 For more information see A376033.
%H A376921 Alois P. Heinz, <a href="/A376921/b376921.txt">Rows n = 0..16, flattened</a>
%e A376921 Triangle T(n,k) begins:
%e A376921    1;
%e A376921    2;
%e A376921    4,  3;
%e A376921    8,  5,  6, 4;
%e A376921   16,  8,  9, 6, 12,  7,  8, 5;
%e A376921   32, 13, 15, 9, 18, 11, 11, 7, 24, 11, 12, 8, 16, 9, 10, 6;
%e A376921   ...
%p A376921 h:= proc(n) option remember; `if`(n=0, 1, 2^(1+ilog2(n))) end:
%p A376921 b:= proc(n, k, t) option remember; `if`(n=0, 1, add(`if`(j=1 and
%p A376921       Bits[And](t, k)>0, 0, b(n-1, k, irem(2*t+j, h(k)))), j=0..1))
%p A376921     end:
%p A376921 T:= (n, k)-> b(n, k, 0):
%p A376921 seq(seq(T(n, k), k=0..ceil(2^(n-1))-1), n=0..7);
%Y A376921 Cf. A376033.
%K A376921 nonn,tabf
%O A376921 0,2
%A A376921 _Alois P. Heinz_, Oct 10 2024