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 A303430 #15 Apr 28 2018 17:55:08 %S A303430 1,2,4,6,10,17,28,49,84,148,263,472,858,1568,2893,5372,10034,18824, %T A303430 35428,66898,126683,240483,457334,870956,1660850,3171112,6061596, %U A303430 11597587,22206775,42551339,81591256,156553245,300565760,577360360,1109601934,2133499936 %N A303430 Number of binary words of length n with exactly twice as many occurrences of subword 101 as occurrences of subword 010. %H A303430 Alois P. Heinz, <a href="/A303430/b303430.txt">Table of n, a(n) for n = 0..3448</a> %e A303430 a(0) = 1: the empty word. %e A303430 a(1) = 2: 0, 1. %e A303430 a(2) = 4: 00, 01, 10, 11. %e A303430 a(3) = 6: 000, 001, 011, 100, 110, 111. %e A303430 a(4) = 10: 0000, 0001, 0011, 0110, 0111, 1000, 1001, 1100, 1110, 1111. %e A303430 a(5) = 17: 00000, 00001, 00011, 00110, 00111, 01100, 01110, 01111, 10000, 10001, 10011, 10101, 11000, 11001, 11100, 11110, 11111. %p A303430 b:= proc(n, t, h, c) option remember; `if`(abs(c)>2*n, 0, %p A303430 `if`(n=0, 1, b(n-1, [1, 3, 1][t], 2, c-`if`(h=3, 2, 0)) %p A303430 + b(n-1, 2, [1, 3, 1][h], c+`if`(t=3, 1, 0)))) %p A303430 end: %p A303430 a:= n-> b(n, 1$2, 0): %p A303430 seq(a(n), n=0..50); %Y A303430 Cf. A005251, A164146, A260668, A284449. %Y A303430 Column k=2 of A303696. %K A303430 nonn %O A303430 0,2 %A A303430 _Alois P. Heinz_, Apr 23 2018