OFFSET
1,2
EXAMPLE
a(3) = 8: {{1}}, {{2}}, {{3}}, {{1,2}}, {{1,3}}, {{2,3}}, {{1,2,3}}, {{1,2},{3}}. Element sums are 1, 2, 3, 3, 4, 5, 6, and 3, respectively.
MAPLE
b:= proc(l, n, k) option remember; local i, j; `if`(l=[0$k], 1, `if`(add(j, j=l)>n*(n-1)/2, 0, b(l, n-1, k))+ add(`if`(l[j]-n<0, 0, b(sort([seq(l[i] -`if`(i=j, n, 0), i=1..k)]), n-1, k)), j=1..k)) end: a:= n-> add(add(b([t$k], n, k), t=2*k-1..floor(n*(n+1)/(2*k)))/k!, k=1..n): seq(a(n), n=1..15);
MATHEMATICA
b[l_, n_, k_] := b[l, n, k] = If[l == Array[0&, k], 1, If[Total[l] > n*(n-1)/2, 0, b[l, n-1, k]] + Sum[If[l[[j]]-n < 0, 0, b[Sort[Table[ l[[i]] - If[i == j, n, 0], {i, 1, k}]], n-1, k]], {j, 1, k}]];
a[n_] := Sum[Sum[b[Array[t&, k], n, k], {t, 2*k-1, Floor[n*(n+1)/(2*k)]} ]/k!, {k, 1, Ceiling[n/2]}];
Table[Print[n, " ", a[n]]; a[n], {n, 1, 25}] (* Jean-François Alcover, Jun 01 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Alois P. Heinz, Oct 03 2011
EXTENSIONS
a(26) from Alois P. Heinz, Oct 20 2014
STATUS
approved