OFFSET
0,13
COMMENTS
A(n,n) = A034856(n+2) for n>=2.
LINKS
Alois P. Heinz, Antidiagonals n = 0..35, flattened
Wikipedia, Polyomino
EXAMPLE
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 13, 1, 1, 1, 1, 1, 1, ...
1, 1, 41, 19, 1, 1, 1, 1, 1, ...
1, 1, 281, 57, 26, 1, 1, 1, 1, ...
1, 1, 1183, 121, 75, 34, 1, 1, 1, ...
1, 1, 6728, 783, 154, 95, 43, 1, 1, ...
1, 1, 31529, 2861, 269, 190, 117, 53, 1, ...
1, 1, 167089, 8133, 1732, 325, 229, 141, 64, ...
MAPLE
b:= proc(n, l) option remember; local d, k; d:= nops(l)/3;
if n=0 then 1
elif min(l[])>0 then (m->b(n-m, map(x->x-m, l)))(min(l[]))
else for k while l[k]>0 do od;
`if`(n<d, 0, b(n, subsop(k=d, l)))+
`if`(d=1 or k>2*d+1 or max(l[k..k+d-1][])>0, 0,
b(n, [l[1..k-1][], 1$d, l[k+d..3*d][]]))
fi
end:
A:= (n, k)-> `if`(k=0, 1, b(n, [0$3*k])):
seq(seq(A(n, d-n), n=0..d), d=0..12);
MATHEMATICA
b[n_, l_List] := b[n, l] = Module[{d = Length[l]/3, k}, Which[n == 0, 1, Min[l] > 0, Function[{m}, b[n-m, l-m]][Min[l]], True, For[k=1, l[[k]] > 0 , k++]; If[n<d, 0, b[n, ReplacePart[l, k -> d]]] + If[d == 1 || k > 2d + 1 || Max[l[[k ;; k + d - 1]]] > 0, 0, b[n, Join[l[[1 ;; k-1]], Array[1&, d], l[[k+d ;; 3*d]]]]]]]; A[n_, k_] := If[k == 0, 1, b[n, Array[0&, 3k]]]; Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Jan 30 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Nov 29 2014
STATUS
approved