login
Triangular array T read by rows: T(h,k) = number of binary words of length h and maximal runlength k.
3

%I #28 Oct 08 2017 17:49:47

%S 2,2,2,2,4,2,2,8,4,2,2,14,10,4,2,2,24,22,10,4,2,2,40,46,24,10,4,2,2,

%T 66,94,54,24,10,4,2,2,108,188,118,56,24,10,4,2,2,176,370,254,126,56,

%U 24,10,4,2,2,286,720,538,278,128,56,24,10,4,2,2,464,1388,1126,606,286,128,56,24,10,4,2

%N Triangular array T read by rows: T(h,k) = number of binary words of length h and maximal runlength k.

%H Alois P. Heinz, <a href="/A048003/b048003.txt">Rows n = 1..141, flattened</a>

%F G.f. of column k: 2*x^k / ((1-Sum_{i=1..k-1} x^i) * (1-Sum_{j=1..k} x^j)). - _Alois P. Heinz_, Oct 29 2008

%F T(n, k) = 0 if k < 1 or k > n, 2 if k = 1 or k = n, 2T(n-1, k) + T(n-1, k-1) - 2T(n-2, k-1) + T(n-k, k-1) - T(n-k-1, k) otherwise (cf. similar formula for A048004). This is a simplification of the L-shaped sum T(n-1, k) + ... + T(n-k, k) + ... + T(n-k,1). - _Andrew Woods_, Oct 11 2013

%F For n > 2k, T(n, n-k) = 2*A045623(k). - _Andrew Woods_, Oct 11 2013

%e Rows: {2}; {2,2}; {2,4,2}; {2,8,4,2}; ...

%e T(3,2) = 4, because there are 4 binary words of length 3 and maximal runlength 2: 001, 011, 100, 110. - _Alois P. Heinz_, Oct 29 2008

%p gf:= proc(n) 2*x^n/ (1-add(x^i, i=1..n-1))/ (1-add(x^j, j=1..n)) end:

%p T:= (h,k)-> coeff(series(gf(k), x, h+1), x, h):

%p seq(seq(T(h,k), k=1..h), h=1..13); # _Alois P. Heinz_, Oct 29 2008

%t gf[n_] := 2*x^n*(x^2-2*x+1) / (x^(2*n+1)-2*x^(n+2)-x^(n+1)+x^n+4*x^2-4*x+1); t[h_, k_] := Coefficient[ Series[ gf[k], {x, 0, h+1}], x, h]; Table[ Table[ t[h, k], {k, 1, h}], {h, 1, 13}] // Flatten (* _Jean-François Alcover_, Oct 07 2013, after _Alois P. Heinz_ *)

%Y T(h,2) = 2*a(h+1) for h=2, 3, ..., where a=A000071.

%Y T(h,3) = 2*b(h) for h=3, 4, ..., where b=A000100.

%Y T(h,4) = 2*c(h) for h=4, 5, ..., where c=A000102.

%Y Cf. A048004.

%Y Columns 5, 6 give: 2*A006979, 2*A006980. Row sums give: A000079.

%Y Cf. A229756.

%K nonn,tabl

%O 1,1

%A _Clark Kimberling_

%E More terms from _Alois P. Heinz_, Oct 29 2008