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 A273344 #26 Nov 29 2016 09:11:59 %S A273344 1,1,1,3,2,6,7,14,19,2,33,53,11,79,148,47,1,194,409,181,10,482,1137, %T A273344 639,69,1214,3159,2166,360,6,3090,8793,7110,1646,66,7936,24515,22831, %U A273344 6868,490,2,20544,68443,72145,26893,2918,44,53545,191367,225138,100598,15085,486,140399,535762,695798,363360,70847,3825 %N A273344 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k levels. A level in a bargraph is a maximal sequence of two or more adjacent horizontal steps; it is preceded and followed by either an up step or a down step. %C A273344 Sum of entries in row n = A082582(n). %H A273344 Alois P. Heinz, <a href="/A273344/b273344.txt">Rows n = 2..250, flattened</a> %H A273344 A. Blecher, C. Brennan, and A. Knopfmacher, <a href="http://amc-journal.eu/index.php/amc/article/view/600/835">Levels in bargraphs</a>, Ars Math. Contemp., 9, 2015, 297-310. %H A273344 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 A273344 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 A273344 T(n,0) = A025243(n+1). %F A273344 Sum(k*T(n,k), k>=1) = A273345(n). %F A273344 G.f.: G(t,z) = (1-2z-z^2+2z^3-2tz^3-sqrt((1-z)(1-3z-z^2+3z^3-4tz^3+4z^4-4tz^4-4z^5+8tz^5-4t^2z^5)))/(2z(1-z+tz)); z marks semiperimeter, t marks levels. See eq. (2.4) in the Blecher et al. Ars. Math. Contemp. reference (set x = z, y = z, w = t). %e A273344 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] having 1, 0, 0, 1, 0 levels, respectively. %e A273344 Triangle starts %e A273344 1; %e A273344 1,1; %e A273344 3,2; %e A273344 6,7; %e A273344 14,19,2. %p A273344 G := (1-2*z-z^2+2*z^3-2*t*z^3-sqrt((1-z)*(1-3*z-z^2+3*z^3-4*t*z^3+4*z^4 -4*t*z^4-4*z^5+8*t*z^5-4*t^2*z^5)))/(2*z*(1-z+t*z)): Gser := simplify(series(G, z = 0, 25)): 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 .. degree(P[n])) end do; # yields sequence in triangular form %p A273344 # second Maple program: %p A273344 b:= proc(n, y, t, w) option remember; expand( %p A273344 `if`(n=0, (1-t), `if`(t<0, 0, b(n-1, y+1, 1, 0))+ %p A273344 `if`(t>0 or y<2, 0, b(n, y-1, -1, 0))+ `if`(y<1, 0, %p A273344 `if`(w=1, z, 1)*b(n-1, y, 0, min(w+1, 2))))) %p A273344 end: %p A273344 T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0$3)): %p A273344 seq(T(n), n=2..20); # _Alois P. Heinz_, Jun 04 2016 %t A273344 b[n_, y_, t_, w_] := b[n, y, t, w] = Expand[If[n == 0, (1 - t), If[t < 0, 0, b[n - 1, y + 1, 1, 0]] + If[t > 0 || y < 2, 0, b[n, y - 1, -1, 0]] + If[y < 1, 0, If[w == 1, z, 1]*b[n - 1, y, 0, Min[w + 1, 2]]]]]; T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[n, 0, 0, 0]]; Table[T[n], {n, 2, 20}] // Flatten (* _Jean-François Alcover_, Nov 29 2016 after _Alois P. Heinz_ *) %Y A273344 Cf. A025243, A082582, A273345. %K A273344 nonn,tabf %O A273344 2,4 %A A273344 _Emeric Deutsch_, May 21 2016