OFFSET
1,2
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (3,1,-3,-1).
FORMULA
G.f. x*(1+x-x^2)/(1-3*x-x^2+3*x^3+x^4).
a(n) = 3*a(n-1)+a(n-2)-3*a(n-3)-a(n-4), a(1)=1, a(2)=4, a(3)=12, a(4)=46.
EXAMPLE
(x+x^2)/(1-3x) = x + (3+1)x^2+... so a(1) = 1 and a(2) = 4.
MATHEMATICA
Rest@ CoefficientList[Series[(x + x^2 - x^3)/(1 - 3 x - x^2 + 3 x^3 + x^4), {x, 0, 24}], x] (* Michael De Vlieger, Dec 12 2016 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Oboifeng Dira, Dec 10 2016
STATUS
approved