This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A271942 #28 Jan 08 2024 10:58:46 %S A271942 1,1,1,1,3,1,1,5,6,1,1,7,16,10,1,1,9,31,40,15,1,1,11,51,105,85,21,1,1, %T A271942 13,76,219,295,161,28,1,1,15,106,396,771,721,280,36,1,1,17,141,650, %U A271942 1681,2331,1582,456,45,1,1,19,181,995,3235,6083,6244,3186,705,55,1,1,21,226,1445,5685,13663,19348,15156,5985,1045,66,1,1,23,276,2014,9325,27483,50464,55308,33903,10615,1496,78,1 %N A271942 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having width k (n>=2, k>=1). %C A271942 Sum of entries in row n = A082582(n). %C A271942 Sum(k*T(n,k), k>=1) = A271943(n). %C A271942 Connection with A145904 should be explored. %H A271942 Alois P. Heinz, <a href="/A271942/b271942.txt">Rows n = 2..150, flattened</a> %H A271942 A. Blecher, C. Brennan, and A. Knopfmacher, <a href="http://dx.doi.org/10.1080/0035919X.2015.1059905">Peaks in bargraphs</a>, Trans. Royal Soc. South Africa, 71, No. 1, 2016, 97-103. %H A271942 M. Bousquet-Mélou and A. Rechnitzer, <a href="http://dx.doi.org/10.1016/S0196-8858(02)00553-5">The site-perimeter of bargraphs</a>, Adv. in Appl. Math. 31 (2003), 86-112. %F A271942 G.f.: G(x,z) satisfies xzG^2-(1-xz-z-xz^2)G+xz^2=0 (z marks semiperimeter, x marks width). %F A271942 T(n, k) = hypergeom([-k, k + 3, k - n], [1, 2], 1), provided one bases the offset in (0, 0). - _Peter Luschny_, Oct 18 2020 %F A271942 T(n, k) = Sum_{j=0..n - k} (binomial(n - k - 1, j)*binomial(n - k, j)*binomial(2*n - k - 2*j, 2*n - 2*k))/(j + 1), provided one bases the offset in (0, 0). - _Detlef Meya_, Jan 07 2023 %e A271942 Row 4 is 1,3,1 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1], [1,2], [2,1], [2,2], [3] which, clearly, have widths 3,2,2,2,1. %e A271942 Triangle starts: %e A271942 1 %e A271942 1, 1 %e A271942 1, 3, 1 %e A271942 1, 5, 6, 1 %e A271942 1, 7, 16, 10, 1 %e A271942 1, 9, 31, 40, 15, 1 %e A271942 1, 11, 51, 105, 85, 21, 1 %e A271942 1, 13, 76, 219, 295, 161, 28, 1 %e A271942 1, 15, 106, 396, 771, 721, 280, 36, 1 %e A271942 1, 17, 141, 650, 1681, 2331, 1582, 456, 45, 1 %p A271942 eq := x*z*G^2-(1-x*z-z-x*z^2)*G+x*z^2 = 0: G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 23)): for n from 2 to 20 do P[n] := sort(expand(coeff(Gser, z, n))) end do: for n from 2 to 20 do seq(coeff(P[n], x, j), j = 1 .. degree(P[n])) end do; # yields sequence in triangular form %p A271942 # second Maple program: %p A271942 b:= proc(n, y, t) option remember; expand(`if`(n=0, (1-t), %p A271942 `if`(t<0, 0, b(n-1, y+1, 1))+`if`(t>0 or y<2, 0, %p A271942 b(n, y-1, -1))+`if`(y<1, 0, b(n-1, y, 0)*z))) %p A271942 end: %p A271942 T:= n-> (p-> seq(coeff(p, z, i), i=1..n-1))(b(n, 0$2)): %p A271942 seq(T(n), n=2..20); # _Alois P. Heinz_, Jun 06 2016 %p A271942 # Alternative, (assuming offset (0,0)): %p A271942 T := (n, k) -> simplify(hypergeom([-k, k + 3, k - n], [1, 2], 1)): %p A271942 seq(seq(T(n, k), k=0..n), n=0..9); # _Peter Luschny_, Oct 18 2020 %t A271942 b[n_, y_, t_] := b[n, y, t] = Expand[If[n == 0, {1 - t}, If[t < 0, 0, b[n - 1, y + 1, 1]] + If[t > 0 || y < 2, 0, b[n, y - 1, -1]] + If[y < 1, 0, b[n - 1, y, 0]*z]]]; %t A271942 T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 1, n-1}]][b[n, 0, 0] ]; %t A271942 Table[T[n], {n, 2, 20}] // Flatten (* _Jean-François Alcover_, Jul 21 2016, after _Alois P. Heinz_ *) %t A271942 T[n_, k_] := Sum[(Binomial[n - k - 1, j]*Binomial[n - k, j]*Binomial[2*n - k - 2*j, 2*n - 2*k])/(j + 1), {j, 0, n - k}]; Flatten[Table[T[n, k], {n, 0, 12}, {k, 0, n}]] (* , provided one bases the offset in (0, 0). _Detlef Meya_, Jan 07 2023 *) %Y A271942 Cf. A082582, A145904, A271943. %K A271942 nonn,tabl %O A271942 2,5 %A A271942 _Emeric Deutsch_, May 21 2016