|
|
A322304
|
|
Total number of colors in all partitions of n into colored blocks of equal parts, such that all colors from a given set are used and the colors are introduced in increasing order.
|
|
2
|
|
|
0, 1, 2, 5, 9, 17, 32, 55, 93, 154, 257, 407, 648, 1003, 1546, 2367, 3566, 5323, 7889, 11579, 16854, 24495, 35171, 50345, 71520, 101184, 142118, 198981, 277260, 384457, 530875, 730220, 1000192, 1365105, 1856155, 2514737, 3398397, 4574460, 6141309, 8218229
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
|
|
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]}];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|