login
Number T(n,k) of bargraphs of site-perimeter n having area k; triangle T(n,k), n>=4, floor((n-1)/2)<=k<=floor(((n-1)^2+3)/12), read by rows.
4

%I #25 Apr 28 2018 12:58:29

%S 1,2,2,2,2,4,4,2,4,7,1,6,6,10,4,2,9,13,14,12,2,8,13,22,18,24,10,2,2,

%T 15,27,40,29,38,28,12,2,10,24,45,65,59,58,56,40,16,4,2,23,52,84,104,

%U 112,100,95,88,56,28,7,1,12,40,92,148,181,205,191,172,163,132,96,48,16,4

%N Number T(n,k) of bargraphs of site-perimeter n having area k; triangle T(n,k), n>=4, floor((n-1)/2)<=k<=floor(((n-1)^2+3)/12), read by rows.

%C A bargraph is a polyomino whose bottom is a segment of the nonnegative x-axis and whose upper part is a lattice path starting at (0,0) and ending with its first return to the x-axis using steps U=(0,1), D=(0,-1) and H=(1,0), where UD and DU are not allowed.

%C The site-perimeter of a polyomino is the number of exterior cells having a common edge with at least one polyomino cell.

%H Alois P. Heinz, <a href="/A274207/b274207.txt">Rows n = 4..100, flattened</a>

%H 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 Wikipedia, <a href="https://en.wikipedia.org/wiki/Polyomino">Polyomino</a>

%F Sum_{k=floor((n-1)/2)..floor(((n-1)^2+3)/12)} k * T(n,k) = A274208(n).

%F Sum_{n>=4} k * T(n,k) = A001787(k).

%F Sum_{n>=4} n * T(n,k) = A274217(k).

%e _

%e T(4,1) = 1: |_|

%e _

%e | | ___

%e T(6,2) = 2: |_| |___|

%e _ _

%e | |_ _| |

%e T(7,3) = 2: |___| |___|

%e _

%e | |

%e | | _____

%e T(8,3) = 2: |_| |_____|

%e ___ _

%e | | _| |_

%e T(8,4) = 2: |___| |_____|

%e _ _

%e | | | | _ _

%e | |_ _| | | |___ ___| |

%e T(9,4) = 4: |___| |___| |_____| |_____|

%e _ _

%e | |_ _| | ___ ___

%e | | | | | |_ _| |

%e T(9,5) = 4: |___| |___| |_____| |_____|

%e _

%e _| |_

%e | |

%e T(10,7) = 1: |_____|

%e .

%e Triangle T(n,k) begins:

%e n\k: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 . .

%e ---+----------------------------------------------------

%e 04 : 1

%e 05 :

%e 06 : 2

%e 07 : 2

%e 08 : 2 2

%e 09 : 4 4

%e 10 : 2 4 7 1

%e 11 : 6 6 10 4

%e 12 : 2 9 13 14 12 2

%e 13 : 8 13 22 18 24 10 2

%e 14 : 2 15 27 40 29 38 28 12 2

%e 15 : 10 24 45 65 59 58 56 40 16 4

%e 16 : 2 23 52 84 104 112 100 95 88 56 28 7 1

%p b:= proc(n, y, t, w) option remember; `if`(n<0, 0, `if`(n=0, (1-t),

%p `if`(t<0, 0, b(n-`if`(w>0 or t=0, 1, 2), y+1, 1, max(0, w-1)))+

%p `if`(t>0 or y<2, 0, b(n, y-1, -1, `if`(t=0, 1, w+1))) +expand(

%p `if`(y<1, 0, z^y*b(n-`if`(t<0, 1, 2), y, 0, `if`(t<0, w, 0))))))

%p end:

%p T:= n-> (p-> seq(coeff(p, z, i),

%p i= iquo(n-1, 2)..iquo((n-1)^2+3, 12)))(b(n, 0, 1, 0)):

%p seq(T(n), n=4..20);

%t b[n_, y_, t_, w_] := b[n, y, t, w] = If[n<0, 0, If[n==0, (1-t), If[t<0, 0, b[n - If[w>0 || t==0, 1, 2], y+1, 1, Max[0, w-1]]] + If[t>0 || y<2, 0, b[n, y-1, -1, If[t==0, 1, w+1]]] + Expand[If[y<1, 0, z^y*b[n - If[t<0, 1, 2], y, 0, If[t<0, w, 0]]]]]];

%t T[n_] := Function[p, Table[Coefficient[p, z, i], {i, Quotient[n-1, 2], Quotient[(n-1)^2 + 3, 12]}]][b[n, 0, 1, 0]];

%t Table[T[n], {n, 4, 20}] // Flatten (* _Jean-François Alcover_, Apr 28 2018, after _Alois P. Heinz_ *)

%Y Row sums give A075126.

%Y Column sums give A000079(k-1).

%Y Cf. A001787, A273346, A274208, A274217.

%K nonn,tabf

%O 4,2

%A _Alois P. Heinz_, Jun 13 2016