cp's OEIS Frontend

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.

A227924 Triangle T(n,k): the number of binary sequences of n zeros and n ones in which the shortest run is of length k.

This page as a plain text file.
%I A227924 #11 Feb 23 2025 16:49:11
%S A227924 2,4,2,18,0,2,64,4,0,2,238,12,0,0,2,890,28,4,0,0,2,3348,70,12,0,0,0,2,
%T A227924 12662,182,20,4,0,0,0,2,48102,466,38,12,0,0,0,0,2,183460,1186,84,20,4,
%U A227924 0,0,0,0,2
%N A227924 Triangle T(n,k): the number of binary sequences of n zeros and n ones in which the shortest run is of length k.
%C A227924 Row n sums to C(2*n,n) (A000984).
%H A227924 Andrew Woods, <a href="/A227924/b227924.txt">Rows n = 1..50 of triangle, flattened</a>
%e A227924 The triangle begins:
%e A227924   2,
%e A227924   4,   2,
%e A227924   18,  0,  2,
%e A227924   64,  4,  0, 2,
%e A227924   238, 12, 0, 0, 2,
%e A227924   ...
%e A227924 The second row counts the sets {0101, 1010, 0110, 1001} and {0011, 1100}.
%o A227924 (PARI)
%o A227924 bn(n,k)=binomial(max(0,n),k)
%o A227924 f(n,k)=2*sum(x=1,floor(n/k),bn(n+x*(1-k)-1,x-1)*(bn(n+x*(1-k)-1,x-1)+bn(n+(x+1)*(1-k)-1,x)))
%o A227924 T(n,k)=f(n,k)-f(n,k+1)
%o A227924 r(n)=vector(n,x,T(n,x))
%Y A227924 Cf. A229756.
%K A227924 nonn,tabl
%O A227924 1,1
%A A227924 _Andrew Woods_, Oct 09 2013