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 (0,0,0,4).
FORMULA
G.f.: (1+4*x-2*x^2-12*x^3)/(4*x^4-1). - Harvey P. Dale, Jun 27 2011
From Bruno Berselli, Nov 02 2011: (Start)
a(n) = (1-(-1)^n-2*(3-2*(-1)^n)*(-1)^floor(n/2))*2^(floor(n/2)-1).
a(2n) = -A122803(n).
a(2n+1) = (-1)^(n+1)*A084221(n+2). (End)
E.g.f.: (1/sqrt(2))*( sinh(sqrt(2)*x) - 5*sin(sqrt(2)*x) - sqrt(2)*cos(sqrt(2)*x) ). - G. C. Greubel, Sep 15 2023
MATHEMATICA
LinearRecurrence[{0, 0, 0, 4}, {-1, -4, 2, 12}, 50] (* or *) CoefficientList[ Series[(1+4x-2x^2-12x^3)/(4x^4-1), {x, 0, 50}], x] (* Harvey P. Dale, Jun 27 2011 *)
PROG
(Magma) &cat[[-(-2)^n, 2^n-5*(-2)^n]: n in [0..20]]; // Bruno Berselli, Nov 02 2011
(SageMath)
def A137447(n): return 2^(n//2)*(-1)^(n//2+1) if n%2==0 else 2^((n-1)//2)*(1 - 5*(-1)^((n-1)//2))
[A137447(n) for n in range(51)] # G. C. Greubel, Sep 15 2023
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Apr 18 2008
EXTENSIONS
More terms from Harvey P. Dale, Jun 27 2011
STATUS
approved