OFFSET
0,4
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (-1,0,0,1,1).
FORMULA
G.f.: -(x^4+2*x^3+2*x+1) / ((x-1)*(x+1)^2*(x^2+1)). - Colin Barker, Mar 04 2013
a(n) = -((2*n+1)*(-1)^n-2*i^(n*(n+1))-3)/4, where i=sqrt(-1). [Bruno Berselli, Mar 04 2013]
a(n) = cos((n-1)*Pi)*(2*n+1-2*cos(n*Pi/2)-3*cos(n*Pi)-2*sin(n*Pi/2))/4. - Wesley Ivan Hurt, Oct 02 2017
E.g.f.: (cos(x) + (1 + x)*cosh(x) - sin(x) - (x - 2)*sinh(x))/2. - Stefano Spezia, May 09 2021
MATHEMATICA
Differences@ CoefficientList[Series[x (1 + 2 x + 2 x^3 + x^4)/((1 + x^2) (x - 1)^2 (1 + x)^2), {x, 0, 84}], x] (* Michael De Vlieger, Oct 02 2017 *)
PROG
(Haskell)
a186422 n = a186422_list !! n
a186422_list = zipWith (-) (tail a186421_list) a186421_list
(Maxima) makelist(-((2*n+1)*(-1)^n-2*%i^(n*(n+1))-3)/4, n, 0, 83); /* Bruno Berselli, Mar 04 2013 */
(Magma) /* By definition: */
A186421:=func<m | Floor(m-(1-(-1)^m)*(m+(-1)^(m*(m+1)/2))/4)>;
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Reinhard Zumkeller, Feb 21 2011
STATUS
approved