OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0, 4).
FORMULA
From R. J. Mathar, corrected Apr 14 2008: (Start)
O.g.f.: (5/(1-2*x) + 3/(1+2*x))/4.
a(n) = (5*2^n + 3*(-2)^n)/4.
a(n) = A000079(n) terms swapped by pairs. - Paul Curtz, Apr 26 2011
a(n) = 2^(n+(-1)^n). - Wesley Ivan Hurt, Dec 13 2013
E.g.f.: (1/4)*(5*exp(2*x) + 3*exp(-2*x)). - G. C. Greubel, Oct 17 2016
MAPLE
MATHEMATICA
LinearRecurrence[{1, 4, -4}, {2, 1, 8}, 40] (* Harvey P. Dale, May 25 2012 *)
LinearRecurrence[{0, 4}, {2, 1}, 32] (* Ray Chandler, Aug 03 2015 *)
PROG
(PARI) a(n)=1<<(n+(-1)^n) \\ Charles R Greathouse IV, Jun 01 2011
(Magma) [(5/4)*2^n+(3/4)*(-2)^n: n in [0..40]]; // Vincenzo Librandi, Jun 02 2011
CROSSREFS
KEYWORD
nonn,easy,less
AUTHOR
Paul Curtz, Feb 19 2008
EXTENSIONS
More terms from R. J. Mathar, Feb 23 2008
STATUS
approved