OFFSET
-2,2
LINKS
G. C. Greubel, Table of n, a(n) for n = -2..5000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,3,0,0,0,-3,0,0,0,1).
FORMULA
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12). This implies that A033996, A158443 and two other 2nd-order polynomials are quadrisections. - R. J. Mathar, Feb 01 2011
From G. C. Greubel, Sep 20 2018: (Start)
a(n) = (1/16)*(n^2 - 4)*(37 - 27*(-1)^n + 6*cos((n*Pi)/2)).
G.f.: 4*(-3 - x - 3*x^2 + 14*x^4 + 6*x^5 + 30*x^6 + 2*x^7 + 21*x^8 + 3*x^9 + 5*x^10)/(x*(1 - x^4)^3).
E.g.f.: (1/8)*((5*x^2 + 32*x - 20)*cosh(x) + (32*x^2 + 5*x - 128)*sinh(x) -3*(x^2 + 4)*cos(x) -3*x*sin(x)). (End)
MATHEMATICA
Table[(1/16)*(n^2-4)*(37-27*(-1)^n +6*Cos[(n*Pi)/2]), {n, -2, 50}] (* G. C. Greubel, Sep 20 2018 *)
LinearRecurrence[{0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1}, {0, -12, -4, -12, 0, 20, 12, 84, 8, 180, 60, 308}, 50] (* Harvey P. Dale, Jan 08 2019 *)
PROG
(PARI) for(n=-2, 50, print1((1/16)*(n^2-4)*(37-27*(-1)^n+6*cos((n*Pi)/2)), ", ")) \\ G. C. Greubel, Sep 20 2018
(Magma) R:= RealField(20); [(1/16)*Round((n^2-4)*(37-27*(-1)^n+ 6*Cos((n*Pi(R))/2))): n in [-2..50]]; // G. C. Greubel, Sep 20 2018
CROSSREFS
KEYWORD
sign,easy,less
AUTHOR
Paul Curtz, Nov 13 2010
STATUS
approved