OFFSET
1,1
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0, 2).
FORMULA
a(n) = (7 - 3*(-1)^n)*2^((2*n-5+(-1)^n)/4).
G.f.: x*(5+4*x)/(1-2*x^2).
MATHEMATICA
Transpose[NestList[{Last[#], 2First[#]}&, {5, 4}, 40]] [[1]] (* Harvey P. Dale, Mar 14 2011 *)
LinearRecurrence[{0, 2}, {5, 4}, 41] (* Ray Chandler, Aug 14 2015 *)
PROG
(Magma) [ n le 2 select 6-n else 2*Self(n-2): n in [1..41] ];
(PARI) x='x+O('x^50); vec(x*(5+4*x)/(1-2*x^2)) \\ G. C. Greubel, Aug 07 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Klaus Brockhaus, Aug 06 2009
STATUS
approved