A242153 Number T(n,k) of ascent sequences of length n with exactly k flat steps; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
1, 1, 0, 1, 1, 0, 2, 2, 1, 0, 5, 6, 3, 1, 0, 16, 20, 12, 4, 1, 0, 61, 80, 50, 20, 5, 1, 0, 271, 366, 240, 100, 30, 6, 1, 0, 1372, 1897, 1281, 560, 175, 42, 7, 1, 0, 7795, 10976, 7588, 3416, 1120, 280, 56, 8, 1, 0, 49093, 70155, 49392, 22764, 7686, 2016, 420, 72, 9, 1, 0
Offset: 0
Examples
Triangle T(n,k) begins: 00: 1; 01: 1, 0; 02: 1, 1, 0; 03: 2, 2, 1, 0; 04: 5, 6, 3, 1, 0; 05: 16, 20, 12, 4, 1, 0; 06: 61, 80, 50, 20, 5, 1, 0; 07: 271, 366, 240, 100, 30, 6, 1, 0; 08: 1372, 1897, 1281, 560, 175, 42, 7, 1, 0; 09: 7795, 10976, 7588, 3416, 1120, 280, 56, 8, 1, 0; 10: 49093, 70155, 49392, 22764, 7686, 2016, 420, 72, 9, 1, 0; ... The 15 ascent sequences of length 4 (dots denote zeros) with their number of flat steps are: 01: [ . . . . ] 3 02: [ . . . 1 ] 2 03: [ . . 1 . ] 1 04: [ . . 1 1 ] 2 05: [ . . 1 2 ] 1 06: [ . 1 . . ] 1 07: [ . 1 . 1 ] 0 08: [ . 1 . 2 ] 0 09: [ . 1 1 . ] 1 10: [ . 1 1 1 ] 2 11: [ . 1 1 2 ] 1 12: [ . 1 2 . ] 0 13: [ . 1 2 1 ] 0 14: [ . 1 2 2 ] 1 15: [ . 1 2 3 ] 0 There are 5 sequences without flat steps, 6 with one flat step, etc., giving row [5, 6, 3, 1, 0] for n=4.
Links
- Joerg Arndt and Alois P. Heinz, Rows n = 0..140, flattened
Crossrefs
Programs
-
Maple
b:= proc(n, i, t) option remember; `if`(n=0, 1, expand(add( `if`(j=i, x, 1) *b(n-1, j, t+`if`(j>i, 1, 0)), j=0..t+1))) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, -1$2)): seq(T(n), n=0..12);
-
Mathematica
b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, Expand[Sum[If[j == i, x, 1]*b[n-1, j, t + If[j>i, 1, 0]], {j, 0, t+1}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, n}]][ b[n, -1, -1]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 06 2015, after Alois P. Heinz *)
Comments