OFFSET
0,13
COMMENTS
For drawings of A(1,1), A(2,2), ..., A(5,5) see A224239.
LINKS
Alois P. Heinz, Antidiagonals n = 0..30, flattened
Steve Butler, Jason Ekstrand, Steven Osborne, Counting Tilings by Taking Walks in a Graph, A Project-Based Guide to Undergraduate Research in Mathematics, Birkhäuser, Cham (2020), see page 169.
EXAMPLE
A(3,3) = 6, because there are 6 tilings of a 3 X 3 rectangle using integer-sided squares:
._____. ._____. ._____. ._____. ._____. ._____.
| | | |_| |_| | |_|_|_| |_|_|_| |_|_|_|
| | |___|_| |_|___| |_| | | |_| |_|_|_|
|_____| |_|_|_| |_|_|_| |_|___| |___|_| |_|_|_|
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 2, 3, 5, 8, 13, 21, ...
1, 1, 3, 6, 13, 28, 60, 129, ...
1, 1, 5, 13, 40, 117, 348, 1029, ...
1, 1, 8, 28, 117, 472, 1916, 7765, ...
1, 1, 13, 60, 348, 1916, 10668, 59257, ...
1, 1, 21, 129, 1029, 7765, 59257, 450924, ...
MAPLE
b:= proc(n, l) option remember; local i, k, s, t;
if max(l[])>n then 0 elif n=0 or l=[] then 1
elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l))
else for k do if l[k]=0 then break fi od; s:=0;
for i from k to nops(l) while l[i]=0 do s:=s+
b(n, [l[j]$j=1..k-1, 1+i-k$j=k..i, l[j]$j=i+1..nops(l)])
od; s
fi
end:
A:= (n, k)-> `if`(n>=k, b(n, [0$k]), b(k, [0$n])):
seq(seq(A(n, d-n), n=0..d), d=0..14);
# The following is a second version of the program that lists the actual dissections. It produces a list of pairs for each dissection:
b:= proc(n, l, ll) local i, k, s, t;
if max(l[])>n then 0 elif n=0 or l=[] then lprint(ll); 1
elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l), ll)
else for k do if l[k]=0 then break fi od; s:=0;
for i from k to nops(l) while l[i]=0 do s:=s+
b(n, [l[j]$j=1..k-1, 1+i-k$j=k..i, l[j]$j=i+1..nops(l)],
[ll[], [k, 1+i-k]])
od; s
fi
end:
A:= (n, k)-> b(k, [0$n], []):
A(5, 5);
# In each list [a, b] means put a square with side length b at
leftmost possible position with upper corner in row a. For example
[[1, 3], [4, 2], [4, 2], [1, 2], [3, 1], [3, 1], [4, 1], [5, 1]], gives:
._____.___.
| | |
| |___|
|_____|_|_|
| | |_|
|___|___|_|
MATHEMATICA
b[n_, l_List] := b[n, l] = Module[{i, k, s, t}, Which[Max[l] > n, 0, n == 0 || l == {}, 1, Min[l] > 0, t = Min[l]; b[n-t, l-t], True, k = Position[l, 0, 1][[1, 1]]; s = 0; For[i = k, i <= Length[l] && l[[i]] == 0, i++, s = s + b[n, Join[l[[1;; k-1]], Table[1+i-k, {j, k, i}], l[[i+1;; -1]] ] ] ]; s]]; a[n_, k_] := If[n >= k, b[n, Array[0&, k]], b[k, Array[0&, n]]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 13 2013, translated from 1st Maple program *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Dec 01 2012
STATUS
approved