OFFSET
1,1
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..100
Index entries for linear recurrences with constant coefficients, signature (0,2).
FORMULA
a(n) = (7+(-1)^n)*2^(1/4*(2*n-5+(-1)^n)).
G.f.: x*(3+8*x)/(1-2*x^2). - corrected by Klaus Brockhaus, Sep 18 2009
MATHEMATICA
With[{lst2=2^Range[0, 20]}, Riffle[3*lst2, 8*lst2]] (* or *) LinearRecurrence[ {0, 2}, {3, 8}, 50](* Harvey P. Dale, Aug 20 2011 *)
PROG
(Magma) [ n le 2 select 5*n-2 else 2*Self(n-2): n in [1..41] ];
(Maxima) a[1]:3$ a[2]:8$ a[n]:=2*a[n-2]$ makelist(a[n], n, 1, 41); /* Bruno Berselli, May 23 2011
(PARI) a(n) = (7+(-1)^n)*2^((2*n-5+(-1)^n)/4) \\ Charles R Greathouse IV, Jun 11 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Klaus Brockhaus, Aug 20 2009
STATUS
approved