A238343 Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n with k descents, n>=0, 0<=k<=n.
1, 1, 0, 2, 0, 0, 3, 1, 0, 0, 5, 3, 0, 0, 0, 7, 9, 0, 0, 0, 0, 11, 19, 2, 0, 0, 0, 0, 15, 41, 8, 0, 0, 0, 0, 0, 22, 77, 29, 0, 0, 0, 0, 0, 0, 30, 142, 81, 3, 0, 0, 0, 0, 0, 0, 42, 247, 205, 18, 0, 0, 0, 0, 0, 0, 0, 56, 421, 469, 78, 0, 0, 0, 0, 0, 0, 0, 0, 77, 689, 1013, 264, 5, 0, 0, 0, 0, 0, 0, 0, 0, 101, 1113, 2059, 786, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0
Examples
Triangle starts: 00: 1; 01: 1, 0; 02: 2, 0, 0; 03: 3, 1, 0, 0; 04: 5, 3, 0, 0, 0; 05: 7, 9, 0, 0, 0, 0; 06: 11, 19, 2, 0, 0, 0, 0; 07: 15, 41, 8, 0, 0, 0, 0, 0; 08: 22, 77, 29, 0, 0, 0, 0, 0, 0; 09: 30, 142, 81, 3, 0, 0, 0, 0, 0, 0; 10: 42, 247, 205, 18, 0, 0, 0, 0, 0, 0, 0; 11: 56, 421, 469, 78, 0, 0, 0, 0, 0, 0, 0, 0; 12: 77, 689, 1013, 264, 5, 0, 0, 0, 0, 0, 0, 0, 0; 13: 101, 1113, 2059, 786, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0; 14: 135, 1750, 4021, 2097, 189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; 15: 176, 2712, 7558, 5179, 751, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; ... From _Gus Wiseman_, Mar 23 2020: (Start) Row n = 5 counts the following compositions: (5) (3,2) (1,4) (4,1) (2,3) (1,3,1) (1,1,3) (2,1,2) (1,2,2) (2,2,1) (1,1,1,2) (3,1,1) (1,1,1,1,1) (1,1,2,1) (1,2,1,1) (2,1,1,1) (End)
Links
- Joerg Arndt and Alois P. Heinz, Rows n = 0..140, flattened
Crossrefs
Columns k=0-10 give: A000041, A241626, A241627, A241628, A241629, A241630, A241631, A241632, A241633, A241634, A241635.
T(3n,n) gives A000045(n+1).
T(3n+1,n) = A136376(n+1).
Row sums are A011782.
Compositions by length are A007318.
The version for co-runs or levels is A106356.
The case of partitions (instead of compositions) is A133121.
The version for runs is A238279.
The version without zeros is A238344.
The version for weak ascents is A333213.
Programs
-
Maple
b:= proc(n, i) option remember; `if`(n=0, 1, expand( add(b(n-j, j)*`if`(j (p-> seq(coeff(p, x, i), i=0..n))(b(n, 0)): seq(T(n), n=0..20);
-
Mathematica
b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n-j, j]*If[jJean-François Alcover, Jan 08 2015, translated from Maple *) Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],n==0||Length[Split[#,LessEqual]]==k+1&]],{n,0,9},{k,0,n}] (* Gus Wiseman, Mar 23 2020 *)
Formula
Sum_{k=0..n} k * T(n,k) = A045883(n-2) for n>=2.
Comments