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 A027557 #18 Jun 13 2015 00:49:07 %S A027557 1,2,4,8,14,26,44,78,130,224,370,626,1028,1718,2810,4656,7594,12506, %T A027557 20356,33374,54242,88640,143906,234594,380548,619238,1003882,1631312, %U A027557 2643386,4291082,6950852,11274702,18258322,29598560 %N A027557 Number of 3-balanced strings of length n: let d(S)= #(1)'s in S - #(0)'s, then S is k-balanced if every substring T has -k<=d(T)<=k; here k=3. %H A027557 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-2,-2). %F A027557 a(n) = a(n-1) + 3a(n-2) - 2a(n-3) - 2a(n-4); g.f. (1+x-x^2) / (1-x-x^2)(1-2x^2). %F A027557 a(n) = 2*A000045(n+3) - 2^floor((n+2)/2) - 2^floor((n+1)/2). - _Max Alekseyev_, Jun 02 2005 %t A027557 LinearRecurrence[{1,3,-2,-2},{1,2,4,8},40] (* _Harvey P. Dale_, Feb 01 2012 *) %o A027557 (PARI) a(n) = 2*fibonacci(n+3) - 2^((n+2)\2) - 2^((n+1)\2) /* _Max Alekseyev_ */ %K A027557 nonn %O A027557 0,2 %A A027557 _R. K. Guy_, _David Callan_