OFFSET
0,2
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 0..26
EXAMPLE
a(1) = 139: (1,2,3,4,5,6), (1,2,3,4,6,5), ..., (3,4,2,1,6,5), (3,4,2,5,1,6).
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([n$6]):
seq(a(n), n=0..6);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 16 2012
STATUS
approved