OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2, 3, 6, -1, 0, -1).
FORMULA
G.f.: (-3 + 9*x + 6*x^2 + 24*x^3 + 5*x^4 - x^5)/(1 - 2*x - 3*x^2 - 6*x^3 + x^4 + x^6).
a(0)=-3, a(1)=3, a(2)=3, a(3)=21, a(4)=77, a(5)=231, a(n) = 2*a(n-1) + 3*a(n-2) + 6*a(n-3) - a(n-4) - a(n-6). - Harvey P. Dale, Nov 18 2013
MATHEMATICA
CoefficientList[Series[(-3+9*x+6*x^2+24*x^3+5*x^4-x^5)/(1-2*x-3*x^2-6*x^3 +x^4+x^6), {x, 0, 30}], x]
Join[{-3}, Times@@@Partition[LinearRecurrence[{1, 1, 1}, {3, 1, 3}, 30], 2, 1]] (* or *) LinearRecurrence[{2, 3, 6, -1, 0, -1}, {-3, 3, 3, 21, 77, 231}, 30] (* Harvey P. Dale, Nov 18 2013 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((-3+9*x+6*x^2+24*x^3+5*x^4-x^5)/(1-2*x-3*x^2-6*x^3 +x^4+x^6)) \\ G. C. Greubel, Apr 21 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (-3+9*x+6*x^2+24*x^3+5*x^4-x^5)/(1-2*x-3*x^2-6*x^3 +x^4+x^6) )); // G. C. Greubel, Apr 21 2019
(Sage) ((-3+9*x+6*x^2+24*x^3+5*x^4-x^5)/(1-2*x-3*x^2-6*x^3 +x^4+x^6)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Apr 21 2019
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Maio Catalani (mario.catalani(AT)unito.it), Aug 08 2002
STATUS
approved