A376110 Number of permutations of {1,2,...,n} that are non-self-overlapping as Hertzsprung patterns; also called non-extendible.
1, 1, 0, 4, 18, 106, 658, 4778, 38770, 352458, 3546170, 39179282, 471653322, 6146403266, 86212578962, 1295136607114, 20747437026442, 353059209467042, 6360348815730370, 120931046165866362, 2420054522391186274, 50846927248165344442, 1119121906010637564906, 25749587951077654272898
Offset: 0
Keywords
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).
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
Comments
The degree of symmetry of a Dyck path is defined as the number of steps in the first half that are mirror images of steps in the second half, with respect to the reflection along the vertical line through the midpoint of the path.
Examples
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; ...
Links
- Sergi Elizalde, The degree of symmetry of lattice paths, arXiv:2002.12874 [math.CO], 2020.
- Sergi Elizalde, Measuring symmetry in lattice paths and partitions, Sem. Lothar. Combin. 84B.26, 12 pp (2020).
Crossrefs
Programs
-
Maple
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
-
Mathematica
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 *)
A339754 Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n having k symmetric vertices (n >= 1, 1 <= k <= n).
1, 0, 2, 0, 2, 3, 0, 2, 6, 6, 0, 4, 12, 16, 10, 0, 8, 24, 40, 40, 20, 0, 20, 60, 104, 120, 90, 35, 0, 50, 150, 270, 350, 330, 210, 70, 0, 140, 420, 768, 1040, 1080, 840, 448, 126, 0, 392, 1176, 2184, 3080, 3468, 3108, 2128, 1008, 252
Offset: 1
Comments
A symmetric vertex is a vertex in the first half of the path (not including the midpoint) that is a mirror image of a vertex in the second half, with respect to reflection along the vertical line through the midpoint of the path.
Examples
For n=5 there are 4 Dyck paths with 2 symmetric vertices: uuuuddddud, uduuuudddd, uuudddudud, ududuuuddd. Triangle begins: 1; 0, 2; 0, 2, 3; 0, 2, 6, 6; 0, 4, 12, 16, 10; 0, 8, 24, 40, 40, 20; 0, 20, 60, 104, 120, 90, 35; 0, 50, 150, 270, 350, 330, 210, 70; 0, 140, 420, 768, 1040, 1080, 840, 448, 126; 0, 392, 1176, 2184, 3080, 3468, 3108, 2128, 1008, 252; ...
Links
- Alois P. Heinz, Rows n = 1..200, flattened
- Sergi Elizalde, The degree of symmetry of lattice paths, arXiv:2002.12874 [math.CO], 2020.
- Sergi Elizalde, Measuring symmetry in lattice paths and partitions, Sem. Lothar. Combin. 84B.26, 12 pp (2020).
Crossrefs
Programs
-
Maple
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+i=v+j, 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
-
Mathematica
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 + i == v + j, 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 *)
A341415 Triangle read by rows: T(n,k) is the number of grand Dyck paths of semilength n having degree of symmetry k (n >= 0, 0 <= k <= n).
1, 0, 2, 2, 0, 4, 4, 8, 0, 8, 14, 16, 24, 0, 16, 44, 64, 48, 64, 0, 32, 148, 208, 216, 128, 160, 0, 64, 504, 736, 720, 640, 320, 384, 0, 128, 1750, 2592, 2672, 2176, 1760, 768, 896, 0, 256, 6156, 9280, 9696, 8448, 6080, 4608, 1792, 2048, 0, 512
Offset: 0
Comments
The degree of symmetry of a grand Dyck path is defined as the number of steps in the first half that are mirror images of steps in the second half, with respect to the reflection along a vertical line through the midpoint of the path.
Examples
For n=3 there are 4 grand Dyck paths with degree of symmetry equal to 0, namely uddduu, uudddu, duuudd, dduuud. The triangle begins: 1 0 2 2 0 4 4 8 0 8 14 16 24 0 16 44 64 48 64 0 32 148 208 216 128 160 0 64 504 736 720 640 320 384 0 128
Links
- Sergi Elizalde, The degree of symmetry of lattice paths, arXiv:2002.12874 [math.CO], 2020.
- Sergi Elizalde, Measuring symmetry in lattice paths and partitions, Sem. Lothar. Combin. 84B.26, 12 pp (2020).
Formula
G.f.: 1/(2(1-u)z+sqrt(1-4z)).
A275448 The number of weakly alternating bargraphs of semiperimeter n. A bargraph is said to be weakly alternating if its ascents and descents alternate. An ascent (descent) is a maximal sequence of consecutive U (D) steps.
1, 2, 3, 4, 6, 12, 28, 65, 146, 327, 749, 1756, 4165, 9913, 23652, 56687, 136627, 330969, 804915, 1963830, 4805523, 11793046, 29019930, 71589861, 177006752, 438561959, 1088714711, 2707615555, 6745272783, 16830750107, 42058592797, 105248042792
Offset: 2
Keywords
Examples
a(4)=3 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1],[1,2],[2,1],[2,2],[3] and the corresponding drawings show that only [1,1,1],[2,2], and [3] lead to weakly alternating bargraphs.
Links
- M. Bousquet-Mélou and A. Rechnitzer, The site-perimeter of bargraphs, Adv. in Appl. Math. 31 (2003), 86-112.
- Emeric Deutsch, S Elizalde, Statistics on bargraphs viewed as cornerless Motzkin paths, arXiv preprint arXiv:1609.00088, 2016
Programs
-
Maple
g := ((1-3*z+3*z^2-sqrt((1-3*z+z^2)*(1-3*z+5*z^2-4*z^3)))*(1/2))/(z*(1-z)): gser:= series(g,z=0,43): seq(coeff(gser,z,n), n=2..40);
-
Mathematica
terms = 32; g[z_] = ((1 - 3z + 3z^2 - Sqrt[(1 - 3z + z^2)(1 - 3z + 5z^2 - 4z^3)])*(1/2) )/(z(1-z)); Drop[CoefficientList[g[z] + O[z]^(terms+2), z], 2] (* Jean-François Alcover, Aug 07 2018 *)
Formula
G.f.: g(z) = (1-3z+3z^2 - Q)/(2z(1-z)), where Q = sqrt((1-3z+z^2)(1-3z+5z^2-4z^3)).
D-finite with recurrence (n+1)*a(n) +(-7*n+2)*a(n-1) +3*(7*n-11)*a(n-2) +(-37*n+107)*a(n-3) +3*(13*n-54)*a(n-4) +3*(-7*n+37)*a(n-5) +2*(2*n-13)*a(n-6)=0. - R. J. Mathar, Jul 22 2022
A274495 The length of the longest initial sequence of the form UHUH..., summed over all bargraphs having semiperimeter n (n>=2).
2, 3, 9, 23, 62, 171, 482, 1384, 4036, 11924, 35619, 107407, 326521, 999675, 3079634, 9539366, 29693294, 92831327, 291366477, 917765199, 2900217452, 9192097510, 29213057684, 93073003438, 297215560553, 951144390092, 3049877146281, 9797605279905
Offset: 2
Keywords
Examples
a(4) = 9 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1], [1,2], [2,1], [2,2], [3] and the corresponding drawings show that the sum of the lengths of their longest initial sequence of the form UHUH... is 2+4+1+1+1.
Links
- M. Bousquet-Mélou and A. Rechnitzer, The site-perimeter of bargraphs, Adv. in Appl. Math. 31 (2003), 86-112.
- Emeric Deutsch, S Elizalde, Statistics on bargraphs viewed as cornerless Motzkin paths, arXiv preprint arXiv:1609.00088, 2016
Programs
-
Maple
Q := sqrt((1-z)*(1-3*z-z^2-z^3)): g := (((1-z)*(1-4*z^2-3*z^3-2*z^4)-(1+z-z^2-2*z^3)*Q)*(1/2))/(z*(1-z)): gser := series(g, z = 0, 38): seq(coeff(gser, z, n), n = 2 .. 34);
-
Mathematica
terms = 28; g[z_] = (((1-z)(1 - 4z^2 - 3z^3 - 2z^4) - (1 + z - z^2 - 2z^3)*Q)(1/2))/(z (1-z)) /. Q -> Sqrt[(1-z)(1 - 3z - z^2 - z^3)]; Drop[CoefficientList[g[z] + O[z]^(terms+2), z], 2] (* Jean-François Alcover, Aug 07 2018 *)
Formula
G.f.: g(z) = ((1-z)*(1-4*z^2-3*z^3-2*z^4)-(1+z-z^2-2*z^3)*Q)/(2*z*(1-z)), where Q = sqrt((1-z)*(1-3*z-z^2-z^3)).
a(n) = Sum_{k>=1} k*A274494(n,k).
D-finite with recurrence -(n+1)*(19*n-44)*a(n) +n*(43*n-65)*a(n-1) +2*(47*n^2-289*n+342)*a(n-2) +2*(-33*n^2+170*n-61)*a(n-3) +(-19*n^2+87*n+22)*a(n-4) -(33*n-31)*(n-8)*a(n-5)=0. - R. J. Mathar, Jul 22 2022
A274494 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k as the length of the longest initial sequence of the form UHUH... (n>=2, 1<=k<=2*floor(n/2)).
0, 1, 1, 1, 3, 1, 0, 1, 8, 2, 1, 2, 22, 5, 4, 3, 0, 1, 62, 13, 12, 6, 1, 3, 178, 35, 35, 15, 5, 6, 0, 1, 519, 97, 103, 40, 17, 13, 1, 4, 1533, 275, 306, 110, 53, 33, 6, 10, 0, 1, 4578, 794, 917, 310, 163, 90, 23, 24, 1, 5, 13800, 2327, 2770, 891, 501, 253, 77, 63, 7, 15, 0, 1
Offset: 2
Comments
Examples
Row 4 is 3,1,0,1 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1],[1,2],[2,1],[2,2],[3] and the corresponding drawings show that the lengths of the longest initial sequence of the form UHUH... are 2,4,1,1,1, respectively. Triangle starts 0,1; 1,1; 3,1,0,1; 8,2,1,2; 22,5,4,3,0,1;
Links
- M. Bousquet-Mélou and A. Rechnitzer, The site-perimeter of bargraphs, Adv. in Appl. Math. 31 (2003), 86-112.
- Emeric Deutsch, S. Elizalde, Statistics on bargraphs viewed as cornerless Motzkin paths, arXiv preprint arXiv:1609.00088 [math.CO], 2016.
Programs
-
Maple
a := z*(1-t^2*z-t^2*z^3+t^4*z^3): b := -t*(1-3*z+z^2+t*z^2-t^2*z^2-z^3+2*t^2*z^3+t*z^4-2*t^3*z^4+t^2*z^4): c := t^2*z^2*(t+z-2*t*z-t*z^2+t^2*z^2): eq := a*G^2+b*G+c = 0: G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 21)): for n from 2 to 18 do P[n] := sort(expand(coeff(Gser, z, n))) end do: for n from 2 to 18 do seq(coeff(P[n], t, j), j = 1 .. 2*floor((1/2)*n)) end do; # yields sequence in triangular form
-
Mathematica
nmax = 12; a = z (1 - t^2 z - t^2 z^3 + t^4 z^3); b = -t (1 - 3z + z^2 + t z^2 - t^2 z^2 - z^3 + 2t^2 z^3 + t z^4 - 2t^3 z^4 + t^2 z^4); c = t^2 z^2 (t + z - 2t z - t z^2 + t^2 z^2); G = 0; Do[G = Series[(-c - a G^2)/b, {z, 0, nmax}, {t, 0, nmax}] // Normal, {nmax}]; cc = CoefficientList[G, z]; row[n_] := CoefficientList[cc[[n+1]], t] // Rest; Table[row[n], {n, 2, nmax}] // Flatten (* Jean-François Alcover, Jul 25 2018 *)
Formula
G.f.: G = G(t,z) satisfies aG^2 + bG + c = 0, where a = z(1-t^2*z-t^2*z^3+t^4*z^3), b = -t(1-3z+z^2+tz^2-t^2*z^2-z^3+2t^2*z^3+tz^4-2t^3*z^4+t^2*z^4), c = t^2*z^2*(t+z-2tz-tz^2+t^2*z^2).
A276066 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having a total of k double rises and double falls (n>=2,k>=0). A double rise (fall) in a bargraph is any pair of adjacent up (down) steps.
1, 1, 0, 1, 1, 2, 1, 0, 1, 2, 4, 1, 4, 1, 0, 1, 4, 6, 8, 8, 1, 6, 1, 0, 1, 7, 14, 22, 12, 19, 12, 1, 8, 1, 0, 1, 13, 34, 43, 48, 55, 18, 35, 16, 1, 10, 1, 0, 1, 26, 72, 105, 148, 109, 116, 103, 24, 56, 20, 1, 12, 1, 0, 1, 52, 154, 276, 344, 347, 398, 205, 232, 166, 30, 82, 24, 1, 14, 1, 0, 1
Offset: 2
Comments
Examples
Row 4 is 1,2,1,0,1 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1], [1,2], [2,1], [2,2], [3] and the corresponding drawings show that they have a total of 0, 1, 1, 2, 4 double rises and double falls, respectively. Triangle starts: 1; 1,0,1; 1,2,1,0,1; 2,4,1,4,1,0,1; 4,6,8,8,1,6,1,0,1.
Links
- Alois P. Heinz, Rows n = 2..140, flattened
- M. Bousquet-Mélou and A. Rechnitzer, The site-perimeter of bargraphs, Adv. in Appl. Math. 31 (2003), 86-112.
- Emeric Deutsch, S Elizalde, Statistics on bargraphs viewed as cornerless Motzkin paths, arXiv preprint arXiv:1609.00088, 2016
Programs
-
Maple
eq := z*G^2-(1-z-t^2*z-2*t*z^2+t^2*z^2)*G+z^2 = 0: G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 22)): for n from 2 to 20 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 2 to 20 do seq(coeff(P[n], t, j), j = 0 .. 2*n-4) end do; # yields sequence in triangular form. # second Maple program: b:= proc(n, y, t) option remember; expand(`if`(n=0, (1-t)* z^(y-1), `if`(t<0, 0, b(n-1, y+1, 1)*`if`(t=1, z, 1))+ `if`(t>0 or y<2, 0, b(n, y-1, -1)*`if`(t=-1, z, 1))+ `if`(y<1, 0, b(n-1, y, 0)))) end: T:= n->(p->seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0$2)): seq(T(n), n=2..12); # Alois P. Heinz, Aug 25 2016
-
Mathematica
b[n_, y_, t_] := b[n, y, t] = Expand[If[n == 0, (1 - t)*z^(y - 1), If[t < 0, 0, b[n - 1, y + 1, 1]*If[t == 1, z, 1]] + If[t > 0 || y < 2, 0, b[n, y - 1, -1]*If[t == -1, z, 1]] + If[y < 1, 0, b[n - 1, y, 0]]]]; T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[n, 0, 0]]; Table[T[n], {n, 2, 12}] // Flatten (* Jean-François Alcover, Dec 02 2016 after Alois P. Heinz *)
Formula
G.f.: G = G(t,z) satisfies zG^2 - (1-z - t^2*z - 2tz^2+t^2*z^2)G + z^2 = 0.
The g.f. B(t,s,z) of bargraphs, where t(s) marks double rises (falls) and z marks semiperimeter, satisfies zB^2 - (1-(1+ts)z +(ts- t-s)z^2)B + z^2 = 0.
A274493 Number of bargraphs of semiperimeter n having no horizontal segments of length 1 (n>=2). By a horizontal segment of length 1 we mean a horizontal step that is not adjacent to any other horizontal step.
0, 1, 2, 3, 6, 13, 27, 57, 123, 267, 584, 1289, 2864, 6399, 14373, 32435, 73498, 167175, 381551, 873541, 2005622, 4616895, 10653607, 24638263, 57097885, 132575577, 308378460, 718506295, 1676706422, 3918515001, 9170350093, 21488961641, 50417138776, 118425429213, 278476687643
Offset: 2
Examples
a(4)=2 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1],[1,2],[2,1],[2,2],[3] and the corresponding pictures give the values 0,2,2,0,1 for the number of horizontal segments of length 1.
Links
- M. Bousquet-Mélou and A. Rechnitzer, The site-perimeter of bargraphs, Adv. in Appl. Math. 31 (2003), 86-112.
Programs
-
Maple
g:=((1-2*z+z^2-2*z^3-sqrt((1-z)*(1-3*z+3*z^2-5*z^3+4*z^4-4*z^5)))*(1/2))/z^2: gser:=series(g,z=0,40): seq(coeff(gser,z,n),n=2..36);
Formula
a(n) = A274491(n,0).
G.f.: g(z)=(1-2z+z^2-2z^3-sqrt((1-z)(1-3z+3z^2-5z^3+4z^4-4z^5)))/(2z^2).
D-finite with recurrence (n+2)*a(n) +2*(-2*n-1)*a(n-1) +6*(n-1)*a(n-2) +4*(-2*n+5)*a(n-3) +9*(n-4)*a(n-4) +4*(-2*n+11)*a(n-5) +4*(n-7)*a(n-6)=0. - R. J. Mathar, Jul 22 2022
A274492 Number of horizontal segments of length 1 in all bargraphs of semiperimeter n (n>=2). By a horizontal segment of length 1 we mean a horizontal step that is not adjacent to any other horizontal step.
1, 1, 5, 16, 52, 170, 556, 1821, 5973, 19620, 64536, 212553, 700903, 2313864, 7646670, 25294673, 83748689, 277518319, 920332567, 3054319120, 10143305864, 33707066667, 112078220233, 372875904038, 1241182355688, 4133534991928, 13772413826888, 45908128269573
Offset: 2
Keywords
Examples
a(4)=5 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1], [1,2], [2,1], [2,2], [3] and the corresponding pictures give the values 0,2,2,0,1 for the number of horizontal segments of length 1.
Links
- M. Bousquet-Mélou and A. Rechnitzer, The site-perimeter of bargraphs, Adv. in Appl. Math. 31 (2003), 86-112.
- Emeric Deutsch, S Elizalde, Statistics on bargraphs viewed as cornerless Motzkin paths, arXiv preprint arXiv:1609.00088, 2016
Programs
-
Maple
g:=(1/2)*(1-z)^3*(1-2*z-z^2-Q)/(z*Q): Q:=sqrt((1-z)*(1-3*z-z^2-z^3)): gser:= series(g,z=0,30): seq(coeff(gser,z,n), n=2..27);
-
Mathematica
g = (1-z)^3 (1-2z-z^2-Q)/(2z Q) /. Q -> Sqrt[(1-z)(1-3z-z^2-z^3)]; a[n_] := SeriesCoefficient[g, {z, 0, n}]; Table[a[n], {n, 2, 29}] (* Jean-François Alcover, Jul 25 2018 *)
Formula
G.f.: g(z)=(1-z)^3*(1-2z-z^2-Q)/(2zQ), where Q = sqrt((1-z)(1-3z-z^2-z^3)).
a(n) = Sum(k*A274491(n,k), k>=0).
D-finite with recurrence (n+1)*a(n) +3*(-2*n+1)*a(n-1) +3*(3*n-8)*a(n-2) +6*(1)*a(n-3) +(-n+19)*a(n-4) +(-2*n+15)*a(n-5) +(-n+8)*a(n-6)=0. - R. J. Mathar, Jul 22 2022
Comments
Examples
Links
Programs
Maple
Formula