OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,2).
FORMULA
a(n) = (3/2-(-1)^n)*2^(1/4*(2*n+3+(-1)^n)).
G.f.: x*(5+2*x)/(1-2*x^2).
MAPLE
A162396:=n->(3/2-(-1)^n)*2^(1/4*(2*n+3+(-1)^n)): seq(A162396(n), n=1..60); # Wesley Ivan Hurt, Oct 08 2017
MATHEMATICA
CoefficientList[Series[(5 + 2*x)/(1 - 2*x^2), {x, 0, 40}], x] (* Wesley Ivan Hurt, Oct 08 2017 *)
RecurrenceTable[{a[1]==5, a[2]==2, a[n]==2 a[n-2]}, a, {n, 40}] (* Vincenzo Librandi, Oct 09 2017 *)
PROG
(Magma) [ n le 2 select 8-3*n else 2*Self(n-2): n in [1..41] ];
(Magma) [Floor((3/2-(-1)^n)*2^(1/4*(2*n+3+(-1)^n))): n in [1..50]]; // Vincenzo Librandi, Oct 09 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Klaus Brockhaus, Jul 02 2009
EXTENSIONS
G.f. corrected, formula simplified, comment added by Klaus Brockhaus, Sep 18 2009
STATUS
approved