The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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. 3
 2, 2, 4, 2, 12, 6, 2, 32, 28, 8, 2, 82, 110, 48, 10, 2, 206, 408, 224, 72, 12, 2, 516, 1454, 968, 378, 100, 14, 2, 1294, 5048, 4016, 1784, 578, 132, 16, 2, 3252, 17244, 16202, 7980, 2924, 830, 168, 18, 2, 8194, 58290, 64058, 34570, 13810, 4464, 1140, 208, 20 (list; table; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Row n sums to C(2n,n) (A000984). LINKS Andrew Woods, Rows n = 1..50 of triangle, flattened FORMULA 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). EXAMPLE The triangle begins: 2 2  4 2 12   6 2 32  28  8 2 82 110 48 10 The second row counts the sets {0101, 1010} and {0011, 0110, 1001, 1100}. PROG (PARI) 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))) g(n, k)=2*sum(i=1, n, h(n, i, k)*(h(n, i, k)+h(n, i+1, k))) T(n, k)=g(n, k)-g(n, k-1) r(n)=vector(n, x, 2*T(n, x)) CROSSREFS Sequence in context: A318834 A067228 A332002 * A227450 A010026 A059427 Adjacent sequences:  A229753 A229754 A229755 * A229757 A229758 A229759 KEYWORD nonn,tabl AUTHOR Andrew Woods, Sep 28 2013 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 29 17:41 EDT 2021. Contains 346346 sequences. (Running on oeis4.)