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.

A371682 Number of binary strings of length n with more 001 than 000 substrings.

This page as a plain text file.
%I A371682 #15 Apr 03 2024 11:45:44
%S A371682 0,0,0,1,3,8,18,41,89,191,400,833,1717,3523,7184,14604,29588,59822,
%T A371682 120695,243166,489271,983530,1975416,3965078,7954340,15950301,
%U A371682 31972219,64069007,128355352,257093509,514864480,1030937876,2064045150,4132012413,8271156673
%N A371682 Number of binary strings of length n with more 001 than 000 substrings.
%H A371682 Alois P. Heinz, <a href="/A371682/b371682.txt">Table of n, a(n) for n = 0..3322</a>
%F A371682 a(n) = 2^n - A164137(n) - A371662(n).
%e A371682 a(5) = 8: 00100, 00101, 00110, 00111, 01001, 10010, 10011, 11001.
%e A371682 a(6) = 18: 001001, 001010, 001011, 001100, 001101, 001110, 001111, 010010, 010011, 011001, 100100, 100101, 100110, 100111, 101001, 110010, 110011, 111001.
%t A371682 tup[n_] := Tuples[{0, 1}, n];
%t A371682 cou[lst_List] := Count[lst, {0, 0, 1}] > Count[lst, {0, 0, 0}];
%t A371682 par[lst_List] := Partition[lst, 3, 1];
%t A371682 a[n_] := a[n] = Map[cou, Map[par, tup[n]]] // Boole // Total;
%t A371682 Monitor[Table[a[n], {n, 0, 23}], {n, Table[a[m], {m, 0, n - 1}]}]
%Y A371682 Cf. A164137 (equal 000 and 001), A371662 (more 000 than 001).
%K A371682 nonn
%O A371682 0,5
%A A371682 _Robert P. P. McKone_, Apr 03 2024
%E A371682 a(26)-a(34) from _Alois P. Heinz_, Apr 03 2024