A242351 Number T(n,k) of isoscent sequences of length n with exactly k ascents; triangle T(n,k), n>=0, 0<=k<=n+3-ceiling(2*sqrt(n+2)), read by rows.
1, 1, 1, 1, 1, 4, 1, 11, 3, 1, 26, 25, 1, 57, 128, 17, 1, 120, 525, 229, 2, 1, 247, 1901, 1819, 172, 1, 502, 6371, 11172, 3048, 53, 1, 1013, 20291, 58847, 33065, 2751, 7, 1, 2036, 62407, 280158, 275641, 56905, 1422, 1, 4083, 187272, 1242859, 1945529, 771451, 61966, 436
Offset: 0
Examples
T(4,0) = 1: [0,0,0,0]. T(4,1) = 11: [0,0,0,1], [0,0,0,2], [0,0,0,3], [0,0,1,0], [0,0,1,1], [0,0,2,0], [0,0,2,1], [0,0,2,2], [0,1,0,0], [0,1,1,0], [0,1,1,1]. T(4,2) = 3: [0,0,1,2], [0,1,0,1], [0,1,1,2]. Triangle T(n,k) begins: 1; 1; 1, 1; 1, 4; 1, 11, 3; 1, 26, 25; 1, 57, 128, 17; 1, 120, 525, 229, 2; 1, 247, 1901, 1819, 172; 1, 502, 6371, 11172, 3048, 53; 1, 1013, 20291, 58847, 33065, 2751, 7; ...
Links
- Joerg Arndt and Alois P. Heinz, Rows n = 0..100, flattened
Crossrefs
Programs
-
Maple
b:= proc(n, i, t) option remember; `if`(n<1, 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..degree(p)))(b(n-1, 0$2)): seq(T(n), n=0..15);
-
Mathematica
b[n_, i_, t_] := b[n, i, t] = If[n<1, 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, Exponent[p, x]}]][b[n-1, 0, 0]]; Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, Feb 09 2015, after Maple *)
Comments