OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (0, 5, 0, -4).
FORMULA
a(2n)=(4^n+2)/3, a(2n+1)=4^n+1.
G.f.: (-5*x^3 - 3*x^2 + 2*x + 1)/(4*x^4 - 5*x^2 + 1)
a(n) = 5/6 + 5/12*2^n - 1/6*( - 1)^n - 1/12*( - 2)^n - Richard Choulet, Dec 07 2008
a(n + 4) = 5*a(n + 2) - 4*a(n) - Richard Choulet, Dec 06 2008
MATHEMATICA
LinearRecurrence[{0, 5, 0, -4}, {1, 2, 2, 5}, 40] (* Harvey P. Dale, Nov 30 2012 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; -4, 0, 5, 0]^n*[1; 2; 2; 5])[1, 1] \\ Charles R Greathouse IV, May 16 2026
(PARI) Vec((-5*x^3-3*x^2+2*x+1)/(4*x^4-5*x^2+1)+O(x^99)) \\ Charles R Greathouse IV, May 16 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul D. Hanna, Feb 22 2003
EXTENSIONS
More terms from Ralf Stephan, Jul 25 2003
STATUS
approved
