OFFSET
1,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,2,0,0,0,-1).
FORMULA
a(n) = 2*a(n-2) - a(n-6), where a(1,2,3)=1.
G.f.: x*(1 + x - x^2)/(1 - 2*x^2 + x^6). - G. C. Greubel, Dec 11 2016
MATHEMATICA
LinearRecurrence[{0, 2, 0, 0, 0, -1}, {1, 1, 1, 2, 2, 4}, 50] (* or *) CoefficientList[Series[x*(1 + x - x^2)/(1 - 2*x^2 + x^6), {x, 1, 50}], x] (* G. C. Greubel, Dec 11 2016 *)
PROG
(PARI) Vec(x*(1 + x - x^2)/(1 - 2*x^2 + x^6) + O(x^50)) \\ G. C. Greubel, Dec 11 2016
(Magma) m:=55; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1+x-x^2)/(1-2*x^2+x^6))); // Vincenzo Librandi, Dec 12 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mark Dols, Jul 23 2009
STATUS
approved