OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-1).
FORMULA
EXAMPLE
a(4) = F(5) = 5.
a(5) = 2*a(4) = 2*5 = 10.
MAPLE
MATHEMATICA
CoefficientList[Series[1 - x (2 x + 1) (x^2 - 2)/((x^2 - x - 1) (x^2 + x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 21 2015 *)
LinearRecurrence[{0, 3, 0, -1}, {1, 2, 4, 5, 10}, 40] (* Harvey P. Dale, Mar 04 2019 *)
PROG
(PARI) a(n)=if(n>1, ([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -1, 0, 3, 0]^(n-2)*[2; 4; 5; 10])[1, 1], 1) \\ Charles R Greathouse IV, Jun 20 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Sep 18 2007
EXTENSIONS
Previous name corrected and new name from R. J. Mathar, Jun 20 2015
STATUS
approved