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 (5,-10,8).
FORMULA
EXAMPLE
G.f. = 2 + 3*x + 3*x^2 + x^3 - x^4 + 9*x^5 + 63*x^6 + 217*x^7 + 527*x^8 + ...
MATHEMATICA
CoefficientList[Series[(2-7*x+8*x^2)/(1-5*x+10*x^2-8*x^3), {x, 0, 60}], x] (* or *) LinearRecurrence[{5, -10, 8}, {2, 3, 3}, 60] (* G. C. Greubel, Aug 04 2018 *)
PROG
(PARI) {a(n) = 2^n + real( (1 + quadgen(-7))^n )};
(PARI) Vec((2 - 7*x + 8*x^2) / (1 - 5*x + 10*x^2 - 8*x^3) + O(x^50)) \\ Michel Marcus, Sep 22 2014
(Magma) m:=60; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((2-7*x+8*x^2)/(1-5*x+10*x^2-8*x^3))); // G. C. Greubel, Aug 04 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Michael Somos, Sep 20 2014
STATUS
approved