OFFSET
0,2
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.: (2*x+1) / (2*(2*x^2-1)) -3 / (2*(2*x-1)).
G.f.: (1 - x)*(1 + x) / ((1 - 2*x)*(1 - 2*x^2)). - Arkadiusz Wesolowski, Oct 24 2013
From G. C. Greubel, Sep 23 2016: (Start)
a(n) = 2^((n-4)/2)*( 6*2^(n/2) - (1 + (-1)^n) - (1 - (-1)^n)*sqrt(2) ).
E.g.f.: (1/2)*( 3*exp(2*x) - cosh(sqrt(2)*x) - sqrt(2)*sinh(sqrt(2)*x) ). (End) [corrected by Jason Yuen, Sep 25 2024]
a(n) = 2*a(n-1) + 2*a(n-2) - 4*a(n-3). - Wesley Ivan Hurt, Apr 07 2021
MATHEMATICA
Table[2^((n - 5)/2)*( 3*2^((n + 1)/2) - (1 - (-1)^n) - (1 + (-1)^n)*Sqrt[2] ), {n, 1, 50}] (* or *) LinearRecurrence[{2, 2, -4}, {1, 2, 5}, 25] (* G. C. Greubel, Sep 23 2016 *)
PROG
(PARI) a(n)=([0, 1, 0; 0, 0, 1; -4, 2, 2]^n*[1; 2; 5])[1, 1] \\ Charles R Greathouse IV, Sep 23 2016
CROSSREFS
KEYWORD
dead
AUTHOR
Paul Curtz, Feb 12 2008
EXTENSIONS
More terms from R. J. Mathar, Feb 15 2008
STATUS
approved