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.

A371692 Table(n,k) of binary strings of length n which have the same number of k long 0...00 and 0...01 substrings, where n>=0 and k>=2, read by downwards antidiagonals.

This page as a plain text file.
%I A371692 #9 Apr 28 2024 11:03:34
%S A371692 1,1,2,1,2,2,1,2,4,3,1,2,4,6,6,1,2,4,8,11,9,1,2,4,8,14,19,15,1,2,4,8,
%T A371692 16,27,35,30,1,2,4,8,16,30,51,61,54,1,2,4,8,16,32,59,96,111,97,1,2,4,
%U A371692 8,16,32,62,115,183,200,189,1,2,4,8,16,32,64,123
%N A371692 Table(n,k) of binary strings of length n which have the same number of k long 0...00 and 0...01 substrings, where n>=0 and k>=2, read by downwards antidiagonals.
%C A371692 To clarify the substrings, k long '0...00' means k consecutive zeros, and k long '0...01' means k-1 consecutive zeros follow by a one.
%e A371692 Table begins:
%e A371692 n\k |     2       3       4       5       6       7       8       9      10
%e A371692 ----+----------------------------------------------------------------------
%e A371692  0  |     1,      1,      1,      1,      1,      1,      1,      1,      1
%e A371692  1  |     2,      2,      2,      2,      2,      2,      2,      2,      2
%e A371692  2  |     2,      4,      4,      4,      4,      4,      4,      4,      4
%e A371692  3  |     3,      6,      8,      8,      8,      8,      8,      8,      8
%e A371692  4  |     6,     11,     14,     16,     16,     16,     16,     16,     16
%e A371692  5  |     9,     19,     27,     30,     32,     32,     32,     32,     32
%e A371692  6  |    15,     35,     51,     59,     62,     64,     64,     64,     64
%e A371692  7  |    30,     61,     96,    115,    123,    126,    128,    128,    128
%e A371692  8  |    54,    111,    183,    224,    243,    251,    254,    256,    256
%e A371692  9  |    97,    200,    345,    436,    480,    499,    507,    510,    512
%e A371692 10  |   189,    369,    655,    851,    948,    992,   1011,   1019,   1022
%e A371692 11  |   360,    676,   1244,   1657,   1872,   1972,   2016,   2035,   2043
%e A371692 12  |   675,   1256,   2363,   3231,   3699,   3920,   4020,   4064,   4083
%e A371692 13  |  1304,   2337,   4500,   6300,   7305,   7792,   8016,   8116,   8160
%e A371692 14  |  2522,   4392,   8570,  12287,  14431,  15491,  15984,  16208,  16308
%e A371692 15  |  4835,   8273,  16347,  23966,  28508,  30793,  31872,  32368,  32592
%e A371692 16  |  9358,  15686,  31218,  46762,  56319,  61215,  63555,  64640,  65136
%e A371692 17  | 18193,  29837,  59678,  91250, 111266, 121692, 126729, 129088, 130176
%e A371692 18  | 35269,  57038, 114236, 178107, 219828, 241919, 252703, 257795, 260160
%e A371692 19  | 68568, 109362, 218905, 347709, 434338, 480930, 503900, 514825, 519936
%t A371692 l0[k_] := l0[k] = ConstantArray[0, k];
%t A371692 l1[k_] := l1[k] = ConstantArray[0, k - 1]~Join~{1};
%t A371692 tup[n_] := Tuples[{0, 1}, n];
%t A371692 cou[lst_List, k_] := Count[lst, l0[k]] == Count[lst, l1[k]];
%t A371692 par[lst_List, k_] := Partition[lst, k, 1];
%t A371692 a[n_, k_] := a[n, k] = Map[cou[#, k] &, Map[par[#, k] &, tup[n]]] // Boole // Total;
%t A371692 (* Data *)Table[a[n, k - n], {k, 2, 13}, {n, 0, k - 2}] // Flatten
%t A371692 (* Table *)Monitor[Table[a[n, k], {n, 0, 19}, {k, 2, 10}] // TableForm, {n, k}]
%Y A371692 Cf. A163493 (Column 1), A164137 (Column 2), A164147 (Column 3), A164178 (Column 4).
%K A371692 nonn,tabl
%O A371692 1,3
%A A371692 _Robert P. P. McKone_, Apr 03 2024