OFFSET
0,3
MAPLE
b:= proc(n, l) option remember; local i, k, s, t;
if max(l[])>n then 0 elif n=0 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 min(k+2, 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-> b(n, [0$n]):
seq(a(n), n=0..10); # Alois P. Heinz, Feb 05 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Geoffrey H. Morley, Feb 05 2013
EXTENSIONS
a(7)-a(16) from Alois P. Heinz, Feb 05 2013
STATUS
approved