OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..2500
Index entries for linear recurrences with constant coefficients, signature (0,0,0,1,0,0,0,-16).
FORMULA
EXAMPLE
G.f. = 2 + x + x^2 + x^3 + x^4 - x^5 - 3*x^6 - 7*x^7 - 31*x^8 - 17*x^9 + ...
MAPLE
seq(coeff(series((2+x+x^2+x^3-x^4-2*x^5-4*x^6-8*x^7)/(1-x^4+16*x^8), x, n+1), x, n), n=0..50); # Muniru A Asiru, Aug 05 2018
MATHEMATICA
CoefficientList[Series[(2+x+x^2+x^3-x^4-2*x^5-4*x^6-8*x^7)/(1 -x^4 + 16*x^8), {x, 0, 60}], x]] (* G. C. Greubel, Aug 05 2018 *)
PROG
(PARI) {a(n) = if( n<0, n=-n; 2^-n, 1) * polcoeff( (2 + x + x^2 + x^3 - x^4 - 2*x^5 - 4*x^6 - 8*x^7) / (1 - x^4 + 16*x^8) + x * O(x^n), n)};
(Magma) m:=60; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((2+x+x^2+x^3-x^4-2*x^5-4*x^6-8*x^7)/(1-x^4+16*x^8))); // G. C. Greubel, Aug 05 2018
(GAP) a:=[2, 1, 1, 1, 1, -1, -3, -7];; for n in [9..50] do a[n]:=a[n-4]-16*a[n-8]; od; a; # Muniru A Asiru, Aug 05 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Michael Somos, Sep 18 2014
STATUS
approved