OFFSET
0,3
MAPLE
b:= proc(l) option remember; local m, n, g;
m, n:= nops(l), add(i, i=l);
g:= add(i*l[i], i=1..m)-(m+1)/2*(n-1);
`if`(n<2, 1, add(`if`(l[i]>0 and i<=g,
b(subsop(i=l[i]-1, l)), 0), i=1..m))
end:
a:= n-> b([2$n]):
seq(a(n), n=1..10); # Alois P. Heinz, Aug 16 2012
MATHEMATICA
b[l_List] := b[l] = Module[{m, n, g}, {m, n} = {Length[l], Total[l]}; g = Sum[i* l[[i]], {i, 1, m}] - (m+1)/2*(n-1); If[n<2, 1, Sum[If[l[[i]]>0 && i <= g, b[ ReplacePart[l, i -> l[[i]]-1]], 0], {i, 1, m}]]]; a[n_] := b[Table[2, {n}]]; Table[a[n], {n, 0, 10}] (* Jean-François Alcover, Mar 13 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,hard
AUTHOR
R. H. Hardin, May 01 2009
EXTENSIONS
a(14) from Alois P. Heinz, Aug 16 2012
a(15) from Alois P. Heinz, Nov 02 2014
a(16) from Vaclav Kotesovec, Sep 07 2016
a(17) from Vaclav Kotesovec, Sep 08 2016
STATUS
approved