login
A075126
Number of bargraphs of site-perimeter n.
6
0, 0, 0, 1, 0, 2, 2, 4, 8, 14, 26, 52, 97, 193, 377, 752, 1500, 3022, 6107, 12429, 25365, 52042, 107090, 221235, 458316, 952439, 1984262, 4144601, 8676232, 18202536, 38263456, 80585694, 170013976, 359277183, 760400787, 1611721413, 3420839200, 7270098883
OFFSET
1,6
LINKS
M. Bousquet-Mélou and A. Rechnitzer, The site-perimeter of bargraphs, Adv. in Appl. Math. 31 (2003), 86-112.
FORMULA
The generating function is known in closed form. Closed, but complicated. It is proved to be non-D-finite.
MAPLE
b:= proc(n, y, t, w) option remember; `if`(n<0, 0, `if`(n=0, (1-t),
`if`(t<0, 0, b(n-`if`(w>0 or t=0, 1, 2), y+1, 1, max(0, w-1)))+
`if`(t>0 or y<2, 0, b(n, y-1, -1, `if`(t=0, 1, w+1)))+
`if`(y<1, 0, b(n-`if`(t<0, 1, 2), y, 0, `if`(t<0, w, 0)))))
end:
a:= n-> b(n, 0, 1, 0):
seq(a(n), n=1..45); # Alois P. Heinz, Jun 05 2016
MATHEMATICA
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]]] + If[y<1, 0, b[n - If[t<0, 1, 2], y, 0, If[t<0, w, 0]]]]]; a[n_] := b[n, 0, 1, 0]; Table[a[n], {n, 1, 45}] (* Jean-François Alcover, Nov 28 2016 after Alois P. Heinz *)
CROSSREFS
Cf. A075125.
Row sums of A274207.
Sequence in context: A357307 A306604 A354784 * A300998 A098788 A190820
KEYWORD
nonn
AUTHOR
Andrew Rechnitzer (a.rechnitzer(AT)ms.unimelb.edu.au), Sep 09 2002
EXTENSIONS
Offset corrected by Alois P. Heinz, Jun 04 2016
a(31)-a(38) from Alois P. Heinz, Jun 05 2016
STATUS
approved