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 A229756 #13 Oct 05 2013 05:43:56 %S A229756 2,2,4,2,12,6,2,32,28,8,2,82,110,48,10,2,206,408,224,72,12,2,516,1454, %T A229756 968,378,100,14,2,1294,5048,4016,1784,578,132,16,2,3252,17244,16202, %U A229756 7980,2924,830,168,18,2,8194,58290,64058,34570,13810,4464,1140,208,20 %N A229756 Triangle T(n,k): the number of binary sequences of n zeros and n ones in which the longest run is of length k. %C A229756 Row n sums to C(2n,n) (A000984). %H A229756 Andrew Woods, <a href="/A229756/b229756.txt">Rows n = 1..50 of triangle, flattened</a> %F A229756 Let h(n,p,k) := sum(j=0..floor((n-p)/k), (-1)^j*C(p,j)*C(n-1-j*k,p-1)) with h(n,p,0) := 0, and let g(n,k) := 2*sum(i=1..n, h(n,i,k)*(h(n,i,k)+h(n,i+1,k))). Then T(n,k) = g(n,k)-g(n,k-1). %e A229756 The triangle begins: %e A229756 2 %e A229756 2 4 %e A229756 2 12 6 %e A229756 2 32 28 8 %e A229756 2 82 110 48 10 %e A229756 The second row counts the sets {0101, 1010} and {0011, 0110, 1001, 1100}. %o A229756 (PARI) %o A229756 h(n,p,k)=if(k==0,0,sum(j=0,floor((n-p)/k),(-1)^j*binomial(p,j)*binomial(n-1-j*k,p-1))) %o A229756 g(n,k)=2*sum(i=1,n,h(n,i,k)*(h(n,i,k)+h(n,i+1,k))) %o A229756 T(n,k)=g(n,k)-g(n,k-1) %o A229756 r(n)=vector(n,x,2*T(n,x)) %K A229756 nonn,tabl %O A229756 1,1 %A A229756 _Andrew Woods_, Sep 28 2013