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 A274486 #24 Aug 19 2017 23:12:45 %S A274486 1,2,3,2,4,8,1,5,20,10,6,40,45,6,7,70,140,56,2,8,112,350,280,44,9,168, %T A274486 756,1008,366,20,10,240,1470,2940,1920,320,5,11,330,2640,7392,7590, %U A274486 2552,190,12,440,4455,16632,24684,13904,2445,70 %N A274486 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k horizontal segments (n>=2, k>=1). A horizontal segment is a maximal sequence of adjacent horizontal steps (1,0). %C A274486 Sum of entries in row n = A082582(n). %C A274486 Sum(k*T(n,k), k>=0) = A273345(n+1). %H A274486 Alois P. Heinz, <a href="/A274486/b274486.txt">Rows n = 2..200, flattened</a> %H A274486 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. %H A274486 Emeric Deutsch, S Elizalde, <a href="http://arxiv.org/abs/1609.00088">Statistics on bargraphs viewed as cornerless Motzkin paths</a>, arXiv preprint arXiv:1609.00088, 2016 %H A274486 Emeric Deutsch, S Elizalde, <a href="http://arxiv.org/abs/1609.00088">Statistics on bargraphs viewed as cornerless Motzkin paths</a>, arXiv preprint arXiv:1609.00088, 2016 %F A274486 G.f.: G = (1-2z+z^2-2tz^2-sqrt((1-z)((1-z)^3-4tz^2*(1-z+tz))))/(2tz). %e A274486 Row 4 is 3,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, clearly, they have 1,2,2,1,1 horizontal segments. %e A274486 Triangle starts %e A274486 1; %e A274486 2; %e A274486 3,2; %e A274486 4,8,1; %e A274486 5,20,10; %e A274486 6,40,45,6. %p A274486 G := ((1-2*z+z^2-2*t*z^2-sqrt((1-z)*((1-z)^3-4*t*z^2*(1-z+t*z))))*(1/2))/(t*z): Gser := simplify(series(G,z = 0,23)): 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 .. degree(P[n])) end do; # yields sequence in triangular form %p A274486 # second Maple program: %p A274486 b:= proc(n, y, t) option remember; expand( %p A274486 `if`(n=0, (1-t), `if`(t<0, 0, b(n-1, y+1, 1))+ %p A274486 `if`(t>0 or y<2, 0, b(n, y-1, -1))+ %p A274486 `if`(y<1, 0, b(n-1, y, 0)*`if`(t=0, 1, z)))) %p A274486 end: %p A274486 T:= n-> (p-> seq(coeff(p, z, i), i=1..degree(p)))(b(n, 0$2)): %p A274486 seq(T(n), n=2..20); # _Alois P. Heinz_, Jun 27 2016 %t A274486 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]*If[t == 0, 1, z]]]]; T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 1, Exponent[p, z]}]][b[n, 0, 0]]; Table[T[n], {n, 2, 20}] // Flatten (* _Jean-François Alcover_, Dec 02 2016, after _Alois P. Heinz_ *) %Y A274486 Cf. A082582, A273345. %K A274486 nonn,tabf %O A274486 2,2 %A A274486 _Emeric Deutsch_ and _Sergi Elizalde_, Jun 27 2016