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.
%I A164147 #21 Apr 28 2024 11:02:35 %S A164147 1,2,4,8,14,27,51,96,183,345,655,1244,2363,4500,8570,16347,31218, %T A164147 59678,114236,218905,419979,806693,1551247,2986469,5756025,11106397, %U A164147 21453737,41486062,80309039,155625030,301882458,586178231,1139315438,2216511306 %N A164147 Number of binary strings of length n with equal numbers of 0000 and 0001 substrings. %H A164147 Alois P. Heinz, <a href="/A164147/b164147.txt">Table of n, a(n) for n = 0..3327</a> (first 501 terms from R. H. Hardin) %H A164147 Shalosh B. Ekhad and Doron Zeilberger, <a href="http://arxiv.org/abs/1112.6207">Automatic Solution of Richard Stanley's Amer. Math. Monthly Problem #11610 and ANY Problem of That Type</a>, arXiv preprint arXiv:1112.6207 [math.CO], 2011. See subpages for rigorous derivations of g.f., recurrence, asymptotics for this sequence. [From _N. J. A. Sloane_, Apr 07 2012] %t A164147 tup[n_] := Tuples[{0, 1}, n]; %t A164147 cou[lst_List] := Count[lst, {0, 0, 0, 0}] == Count[lst, {0, 0, 0, 1}]; %t A164147 par[lst_List] := Partition[lst, 4, 1]; %t A164147 a[n_] := a[n] = Map[cou, Map[par, tup[n]]] // Boole // Total; %t A164147 Monitor[Table[a[n], {n, 0, 18}], {n, Table[a[m], {m, 0, n - 1}]}] (* _Robert P. P. McKone_, Apr 03 2024 *) %Y A164147 Cf. A163493 (equal 00 and 01), A164137 (equal 000 and 001), A164178 (equal 00000 and 00001). %K A164147 nonn %O A164147 0,2 %A A164147 _R. H. Hardin_, Aug 11 2009