login
A117666
Expansion of (1-3*x+x^2)*(1-x-x^2)/((1+x+x^2)*(1-x+x^2)*(1-x)^2).
1
1, -2, -3, 2, 3, 2, 3, 0, -1, 4, 5, 4, 5, 2, 1, 6, 7, 6, 7, 4, 3, 8, 9, 8, 9, 6, 5, 10, 11, 10, 11, 8, 7, 12, 13, 12, 13, 10, 9, 14, 15, 14, 15, 12, 11, 16, 17, 16, 17, 14, 13, 18, 19, 18, 19, 16, 15, 20, 21, 20, 21, 18, 17, 22, 23, 22, 23, 20, 19, 24, 25, 24, 25, 22, 21, 26, 27, 26, 27, 24, 23, 28, 29, 28, 29, 26, 25
OFFSET
0,2
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
Sequence in context: A036048 A145384 A339601 * A274921 A274821 A275720
KEYWORD
easy,sign
AUTHOR
Creighton Dement, Apr 11 2006
STATUS
approved