A298645
Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n having degree of asymmetry k (n >= 1, 0 <= k <= n-1).
Original entry on oeis.org
1, 2, 0, 3, 0, 2, 6, 0, 6, 2, 10, 0, 16, 8, 8, 20, 0, 40, 24, 32, 16, 35, 0, 90, 60, 108, 84, 52, 70, 0, 210, 150, 310, 294, 262, 134, 126, 0, 448, 336, 816, 880, 1008, 816, 432, 252, 0, 1008, 784, 2100, 2460, 3208, 3192, 2544, 1248, 462, 0, 2100, 1680, 5040, 6300, 9300, 10680, 10760, 8360, 4104
Offset: 1
Triangle begins:
1;
2, 0;
3, 0, 2;
6, 0, 6, 2;
10, 0, 16, 8, 8;
20, 0, 40, 24, 32, 16;
35, 0, 90, 60, 108, 84, 52;
70, 0, 210, 150, 310, 294, 262, 134;
126, 0, 448, 336, 816, 880, 1008, 816, 432;
252, 0, 1008, 784, 2100, 2460, 3208, 3192, 2544, 1248;
...
Row n = 3 is [3,0,2]. Indeed, showing the step levels, the Dyck paths 111111, 122221, 123321 are symmetric and each of the Dyck paths 111221, 122111 has degree of asymmetry 2.
-
m := 8: EL := proc (s) options operator, arrow: [1, seq(1+s[j], j = 1 .. nops(s)), 1] end proc: mg := proc (u, v) options operator, arrow: [seq(u[i], i = 1 .. nops(u)), seq(v[j], j = 1 .. nops(v))] end proc: ME := proc (u, v) options operator, arrow: mg(EL(u), v) end proc: Y[0] := {[]}: for n to m do Y[n] := {}: for p from 0 to n-1 do for q to nops(Y[p]) do for r to nops(Y[n-1-p]) do Y[n] := `union`(Y[n], {ME(Y[p][q], Y[n-1-p][r])}) end do end do end do end do: r := proc (s) options operator, arrow: [seq(s[nops(s)-j+1], j = 1 .. nops(s))] end proc: b := proc (s) local i, j: j := 0: for i to nops(s) do if 0 < abs((s-r(s))[i]) then j := j+1 else end if end do: (1/2)*j end proc: P := proc (n) options operator, arrow: sort(add(t^b(Y[n][q]), q = 1 .. binomial(2*n, n)/(n+1))) end proc: T := proc (n, k) options operator, arrow: coeff(P(n), t, k) end proc: for n to m do seq(T(n, k), k = 0 .. n-1) end do;
# second Maple program:
b:= proc(x, y, v) option remember; expand(
`if`(min(y, v, x-max(y, v))<0, 0, `if`(x=0, 1, (l-> add(add(
`if`(y=v+(j-i)/2, 1, z)*b(x-1, y+i, v+j), i=l), j=l))([-1, 1]))))
end:
g:= proc(n) option remember; add(b(n, j$2), j=0..n) end:
T:= (n, k)-> coeff(g(n), z, k):
seq(seq(T(n, k), k=0..n-1), n=1..12); # Alois P. Heinz, Feb 20 2018
-
b[x_, y_, v_] := b[x, y, v] = Expand[If[Min[y, v, x - Max[y, v]] < 0, 0, If[x == 0, 1, Function[l, Sum[Sum[If[y == v + (j - i)/2, 1, z]*b[x - 1, y + i, v + j], {i, l}], {j, l}]][{-1, 1}]]]];
g[n_] := g[n] = Sum[b[n, j, j], {j, 0, n}];
T[n_, k_] := Coefficient[g[n], z, k];
Table[Table[T[n, k], {k, 0, n-1}], {n, 1, 12}] // Flatten (* Jean-François Alcover, Dec 07 2019, after Alois P. Heinz *)
A191521
Triangle read by rows: T(n,k) is the number of left factors of Dyck paths of length n that have k valleys (i.e., a (1,-1)-step followed by a (1,1)-step).
Original entry on oeis.org
1, 1, 2, 2, 1, 3, 3, 3, 6, 1, 4, 12, 4, 4, 18, 12, 1, 5, 30, 30, 5, 5, 40, 60, 20, 1, 6, 60, 120, 60, 6, 6, 75, 200, 150, 30, 1, 7, 105, 350, 350, 105, 7, 7, 126, 525, 700, 315, 42, 1, 8, 168, 840, 1400, 840, 168, 8, 8, 196, 1176, 2450, 1960, 588, 56, 1, 9, 252, 1764, 4410, 4410, 1764, 252, 9
Offset: 0
T(4,1)=3 because we have U(DU)D, U(DU)U, and UU(DU), where U=(1,1) and D=(1,-1) (the valleys are shown between parentheses).
Triangle starts:
1;
1;
2;
2, 1;
3, 3;
3, 6, 1;
4, 12, 4;
4, 18, 12, 1;
...
-
Q := sqrt(((1-z)^2-t*z^2)*((1+z)^2-t*z^2)): G := (1+t*z^2-z^2-Q)/(t*z*(t*z^2-1+2*z-z^2+Q)): Gser := simplify(series(G, z = 0, 19)): for n from 0 to 16 do P[n] := sort(coeff(Gser, z, n)) end do: 1; for n to 16 do seq(coeff(P[n], t, k), k = 0 .. ceil((1/2)*n)-1) end do; # yields sequence in triangular form
# second Maple program:
b:= proc(x, y, t) option remember; expand(`if`(x=0, 1,
`if`(y>0, b(x-1, y-1, z), 0)+b(x-1, y+1, 1)*t))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0, 1)):
seq(T(n), n=0..30); # Alois P. Heinz, Mar 29 2017
-
T[n_, m_] := If [n == 0 && m == 0, 1, If[n == 0, 0, If[OddQ[n-1], (2* Binomial[n/2, m]*Binomial[n/2, m+1]*(n/2 + 1))/n, Binomial[(n+1)/2, m+1]*Sum[(-1)^(k-1)*Binomial[(n+1)/2, m-k+1], {k, 1, (n+1)/2}]]]];
Table[T[n, m], {n, 0, 16}, {m, 0, If[n <= 2, 0, Quotient[n-1, 2]]}] // Flatten (* Jean-François Alcover, Feb 16 2021, after Vladimir Kruchinin *)
-
T(n,m):=if n=0 and m=0 then 1 else if n=0 then 0 else if oddp(n-1) then (2*binomial(n/2,m)*binomial(n/2,m+1)*(n/2+1))/n else binomial((n+1)/2,m+1)*sum((-1)^(k-1)*binomial((n+1)/2,m-k+1),k,1,(n+1)/2);
/* Vladimir Kruchinin, Jul 24 2019 */
A341445
Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n having degree of symmetry k (n >= 1, 1 <= k <= n).
Original entry on oeis.org
1, 0, 2, 2, 0, 3, 2, 6, 0, 6, 8, 8, 16, 0, 10, 16, 32, 24, 40, 0, 20, 52, 84, 108, 60, 90, 0, 35, 134, 262, 294, 310, 150, 210, 0, 70, 432, 816, 1008, 880, 816, 336, 448, 0, 126, 1248, 2544, 3192, 3208, 2460, 2100, 784, 1008, 0, 252
Offset: 1
For n=4 there are 6 Dyck paths with degree of symmetry equal to 2: uuuddudd, uuduuddd, uududdud, uuddudud, uduududd, ududuudd.
Triangle begins:
1;
0, 2;
2, 0, 3;
2, 6, 0, 6;
8, 8, 16, 0, 10;
16, 32, 24, 40, 0, 20;
52, 84, 108, 60, 90, 0, 35;
134, 262, 294, 310, 150, 210, 0, 70;
432, 816, 1008, 880, 816, 336, 448, 0, 126;
1248, 2544, 3192, 3208, 2460, 2100, 784, 1008, 0, 252;
...
Equivalent to
A298645 with rows reversed.
Column k=1 gives
A298647 (for n>2).
Second subdiagonal gives 2*
A191522.
-
b:= proc(x, y, v) option remember; expand(
`if`(min(y, v, x-max(y, v))<0, 0, `if`(x=0, 1, (l-> add(add(
`if`(y=v+(j-i)/2, z, 1)*b(x-1, y+i, v+j), i=l), j=l))([-1, 1]))))
end:
g:= proc(n) option remember; add(b(n, j$2), j=0..n) end:
T:= (n, k)-> coeff(g(n), z, k):
seq(seq(T(n, k), k=1..n), n=1..10); # Alois P. Heinz, Feb 12 2021
-
b[x_, y_, v_] := b[x, y, v] = Expand[If[Min[y, v, x - Max[y, v]] < 0, 0, If[x == 0, 1, Function[l, Sum[Sum[If[y == v + (j - i)/2, z, 1]*b[x - 1, y + i, v + j], {i, l}], {j, l}]][{-1, 1}]]]];
g[n_] := g[n] = Sum[b[n, j, j], {j, 0, n}];
T[n_, k_] := Coefficient[g[n], z, k];
Table[Table[T[n, k], {k, 1, n}], {n, 1, 10}] // Flatten (* Jean-François Alcover, Feb 13 2021, after Alois P. Heinz *)
Showing 1-3 of 3 results.
Comments