A105147 Triangular array read by rows: T(n,k) = number of compositions of n having smallest part equal to k.
1, 1, 1, 3, 0, 1, 6, 1, 0, 1, 13, 2, 0, 0, 1, 27, 3, 1, 0, 0, 1, 56, 5, 2, 0, 0, 0, 1, 115, 9, 2, 1, 0, 0, 0, 1, 235, 15, 3, 2, 0, 0, 0, 0, 1, 478, 25, 5, 2, 1, 0, 0, 0, 0, 1, 969, 42, 8, 2, 2, 0, 0, 0, 0, 0, 1, 1959, 70, 12, 3, 2, 1, 0, 0, 0, 0, 0, 1, 3952, 116, 18, 5, 2, 2, 0, 0, 0, 0, 0, 0, 1
Offset: 1
Examples
1; 1, 1; 3, 0, 1; 6, 1, 0, 1; 13, 2, 0, 0, 1; 27, 3, 1, 0, 0, 1; 56, 5, 2, 0, 0, 0, 1;
Links
- Alois P. Heinz, Rows n = 1..141, flattened
Crossrefs
Cf. A048004.
Row sums give: A000079(n-1), columns k=1, 2 give: A099036(n-1), A200047. - Alois P. Heinz, Nov 13 2011
Programs
-
Maple
p:= (t, l)-> zip((x, y)->x+y, t, l, 0): b:= proc(n) option remember; local j, t, h, m, s; t:= [0$(n-1), 1]; for j to n-1 do h:= b(n-j); m:= nops(h); t:= p(p(t, [seq(h[i], i=1..min(j, m))]), [0$(j-1), add(h[i], i=j+1..m)]) od; t end: T:= n-> b(n)[]: seq(T(n), n=1..15); # Alois P. Heinz, Nov 13 2011
-
Mathematica
zip[f_, x_, y_, z_] := With[{m = Max[Length[x], Length[y]]}, Thread[f[PadRight[x, m, z], PadRight[y, m, z]]]]; p[t_, l_] := zip[Plus, t, l, 0]; b[n_] := b[n] = Module[{j, t, h, m, s}, t = Append[Array[0&, n-1], 1]; For[j = 1, j <= n-1 , j++, h = b[n-j]; m = Length[h]; t = p[p[t, h[[1 ;; Min[j, m]]]], Append[Array[0&, j-1], h[[Min[j, m]+1 ;; m]] // Total]]]; t]; Table[b[n], {n, 1, 15}] // Flatten (* Jean-François Alcover, Jan 29 2014, after Alois P. Heinz *)
Formula
G.f. for k-th column: (1-x)^2*x^k/((1-x-x^k)*(1-x-x^(k+1))).