OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,1,-2).
FORMULA
a(n+1) - 2*a(n) = 4*( 3*(-1)^n-1) = 8 *(-1)^n*A000034(n).
G.f.: -(5*x-1)*(3*x-1) / ( (x-1)*(2*x-1)*(1+x) ). - R. J. Mathar, Jul 01 2011
E.g.f.: 8*sinh(x) - exp(2*x). - G. C. Greubel, May 30 2016
MATHEMATICA
LinearRecurrence[{2, 1, -2}, {-1, 6, -4}, 50] (* or *) Table[4*(1-(-1)^n) - 2^n, {n, 0, 25}] (* G. C. Greubel, May 30 2016 *)
PROG
(Magma) [4*( 1-(-1)^n) -2^n: n in [0..40] ]; // Vincenzo Librandi, Aug 06 2011
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Curtz, Oct 26 2009
STATUS
approved