OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1650
EXAMPLE
a(4) = 9. The colored partitions are: 1111a, 2a11a, 22a, 3a1a, 4a, 2a11b, 3a1b. The total number of colors used is 1+1+1+1+1+2+2 = 9.
MAPLE
b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0, add(
(t-> b(t, min(t, i-1), k))(n-i*j), j=1..n/i)*k+b(n, i-1, k)))
end:
a:= proc(n) option remember; add(add(binomial(k, i)*(-1)^i*
b(n$2, k-i), i=0..k)/(k-1)!, k=1..floor((sqrt(1+8*n)-1)/2))
end:
seq(a(n), n=0..44);
MATHEMATICA
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[With[{t = n - i j}, b[t, Min[t, i - 1], k]], {j, 1, n/i}] k + b[n, i - 1, k]]];
a[n_] := Sum[Sum[Binomial[k, i] (-1)^i b[n, n, k - i], {i, 0, k}]/(k - 1)!, {k, 1, Floor[(Sqrt[1 + 8n] - 1)/2]}];
a /@ Range[0, 44] (* Jean-François Alcover, Dec 14 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 28 2019
STATUS
approved