OFFSET
1,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (-2,0,2,1).
FORMULA
a(2*n) = a(2*n-1)+4*n^2-2*n-2, a(2*n+1) = -a(2*n)-2*n.
Abs(a(n)) = A047838(n) for n > 1.
G.f.: x*(-1-3*x+x^2+x^3) / ((x-1)*(1+x)^3). - R. J. Mathar, Apr 14 2011
a(n) = a(-n) = ((2*n^2-5)*(-1)^n+1)/4. - Bruno Berselli, Sep 14 2011
E.g.f.: 1 + ((x^2 - x - 2)*cosh(x) - (x^2 - x - 3)*sinh(x))/2. - Stefano Spezia, Jul 08 2023
MATHEMATICA
LinearRecurrence[{-2, 0, 2, 1}, {1, 1, -3, 7}, 75] (* Jean-François Alcover, Dec 16 2021 *)
PROG
(Haskell)
a188653 n = a188653_list !! (n-1)
a188653_list = zipWith (-) (tail a188652_list) a188652_list
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Reinhard Zumkeller, Apr 13 2011
STATUS
approved