OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,4,-4,2,-2).
FORMULA
G.f.: [(1+2x)(1+x^2)]/[(1-x)(1-4x^2-2x^4)]. - Ralf Stephan, Apr 30 2004
MATHEMATICA
LinearRecurrence[{1, 4, -4, 2, -2}, {1, 3, 8, 18, 40}, 50] (* Paolo Xausa, Feb 02 2024 *)
PROG
(PARI) a(n)=([0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0, 1; -2, 2, -4, 4, 1]^n*[1; 3; 8; 18; 40])[1, 1] \\ Charles R Greathouse IV, Jun 02 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved
