OFFSET
0,3
LINKS
Eric Weisstein's World of Mathematics, Ferrers Diagram
Wikipedia, Domino
Wikipedia, Domino tiling
Wikipedia, Ferrers diagram
Wikipedia, Partition (number theory)
Wikipedia, Polyomino
Wikipedia, Young tableau, Diagrams
MAPLE
h:= proc(l, f) option remember; local k; if min(l[])>0 then
`if`(nops(f)=0, 1, h(map(x-> x-1, l[1..f[1]]), subsop(1=[][], f)))
else for k from nops(l) while l[k]>0 by -1 do od; h(subsop(k=1, l), f)+
`if`(nops(f)>0 and f[1]>=k, h(subsop(k=2, l), f), 0)+
`if`(k>1 and l[k-1]=0, h(subsop(k=1, k-1=1, l), f), 0)
fi
end:
g:= l-> `if`(l=[], 1, h([0$l[1]], subsop(1=[][], l))):
b:= (n, i, l)-> `if`(n=0 or i=1, g([l[], 1$n]), b(n, i-1, l)
+b(n-i, min(n-i, i), [l[], i])):
a:= n-> b(n$2, []):
seq(a(n), n=0..23);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, May 16 2018
STATUS
approved