OFFSET
0,3
COMMENTS
a(n) is the number of compositions of n using three colors of 3. Compare to A077998 which gives the number of compositions of n using two colors of 2. - Greg Dresden and Yushu Fan, Aug 15 2023
LINKS
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 1043
Index entries for linear recurrences with constant coefficients, signature (2,0,2,-2).
FORMULA
G.f.: -(-1+x)/(1-2*x-2*x^3+2*x^4).
Recurrence: {a(1)=1, a(0)=1, a(3)=6, a(2)=2, 2*a(n)-2*a(n+1)-2*a(n+3)+a(n+4)=0}.
Sum(-1/227*(-29-50*_alpha+45*_alpha^3-14*_alpha^2)*_alpha^(-1-n), _alpha=RootOf(1-2*_Z-2*_Z^3+2*_Z^4)).
MAPLE
spec := [S, {S=Sequence(Prod(Union(Prod(Union(Z, Z), Z), Sequence(Z)), Z))}, unlabeled ]: seq(combstruct[count ](spec, size=n), n=0..20);
MATHEMATICA
CoefficientList[Series[(1-x)/(1-2x-2x^3+2x^4), {x, 0, 30}], x] (* or *) LinearRecurrence[{2, 0, 2, -2}, {1, 1, 2, 6}, 32] (* Harvey P. Dale, Jul 23 2012 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
More terms from James A. Sellers, Jun 06 2000
STATUS
approved