OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-2,2,-2,2,-1).
FORMULA
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - 2*a(n-4) + 2*a(n-5) - a(n-6) for n>5. - Colin Barker, May 18 2019
MATHEMATICA
CoefficientList[Series[(1-3*x+x^2)*(1-x-x^2)/((1+x^2+x^4)*(1-x)^2), {x, 0, 100}], x] (* G. C. Greubel, Jul 13 2019 *)
PROG
(PARI) Vec((1-3*x+x^2)*(1-x-x^2)/((1-x)^2*(1+x^2+x^4)) + O(x^100)) \\ Colin Barker, May 18 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 100); Coefficients(R!( (1-3*x+x^2)*(1-x-x^2)/((1+x^2+x^4)*(1-x)^2) )); // G. C. Greubel, Jul 13 2019
(Sage) ((1-3*x+x^2)*(1-x-x^2)/((1+x^2+x^4)*(1-x)^2)).series(x, 100).coefficients(x, sparse=False) # G. C. Greubel, Jul 13 2019
(GAP) a:=[1, -2, -3, 2, 3, 2];; for n in [7..100] do a[n]:=2*a[n-1] -2*a[n-2] +2*a[n-3] -2*a[n-4] +2*a[n-5] -a[n-6]; od; a; # G. C. Greubel, Jul 13 2019
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Creighton Dement, Apr 11 2006
STATUS
approved