OFFSET
0,4
COMMENTS
a(1) = a(2) = 0 because we need to use exactly three colors, which means the number of parts should be greater than two.
All terms are multiples of 6.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Ran Pan, A note on enumerating colored integer partitions, arXiv:1509.06107 [math.CO], 2015.
Ran Pan, Exercise S, Project P.
FORMULA
G.f.: 3/2*Product_{k>=1} (1/(1-2*x^k)) - 6*Product_{k>=1} (1/(1-x^k)) + 3/(1-x) + 3/2.
a(n) = 6 * A262495(n,3). - Alois P. Heinz, Sep 24 2015
EXAMPLE
a(3)=6 because there are three partitions of 3 and there are no ways to color [3] or [2,1] but there are six ways to color [1,1,1].
MAPLE
b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1, k) +`if`(i>n, 0, k*b(n-i, i, k))))
end:
a:= n-> `if`(n=0, 0, b(n$2, 2)/2*3-6*b(n$2, 1)+3):
seq(a(n), n=0..40); # Alois P. Heinz, Sep 23 2015
MATHEMATICA
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, b[n, i - 1, k] + If[i > n, 0, k*b[n - i, i, k]]]]; a[n_] := If[n == 0, 0, b[n, n, 2]/2*3 - 6*b[n, n, 1] + 3]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 07 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ran Pan, Sep 23 2015
STATUS
approved