OFFSET
1,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (4,-1,0,-2).
FORMULA
Empirical G.f.: x*(1-2*x-2*x^2)/((1-x)*(1-3*x-2*x^2-2*x^3)). - Colin Barker, Apr 17 2012
MATHEMATICA
Accumulate[LinearRecurrence[{3, 2, 2}, {1, 1, 3}, 30]] (* Harvey P. Dale, Jul 20 2013 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -2, 0, -1, 4]^(n-1)*[1; 2; 5; 18])[1, 1] \\ Charles R Greathouse IV, May 29 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Jun 02 2003
STATUS
approved
