OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,2,-4).
FORMULA
From R. J. Mathar, Feb 15 2008: (Start)
O.g.f.: -3/(2*(2*x-1)) + (4*x+3)/(2*(2*x^2-1)).
a(n) = 3*2^(n-1) - A063759(n+1)/2. (End)
From Colin Barker, Sep 23 2016: (Start)
a(n) = 3*2^(n-1) - 3*2^(n/2-1) for n even.
a(n) = 3*2^(n-1) - 2^((n+1)/2) for n odd. (End)
MATHEMATICA
LinearRecurrence[{2, 2, -4}, {0, 1, 3}, 50] (* G. C. Greubel, Sep 22 2016 *)
PROG
(Magma) I:=[0, 1, 3]; [n le 3 select I[n] else 2*Self(n-1)+2*Self(n-2)-4*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Sep 23 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Feb 12 2008
EXTENSIONS
More terms from R. J. Mathar, Feb 15 2008
STATUS
approved