OFFSET
0,6
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-1,0,0,1,1).
FORMULA
From Wesley Ivan Hurt, May 29 2016: (Start)
G.f.: x*(1-x^2-x^3) / ((1+x)^2*(-1+x-x^2+x^3)).
a(n) + a(n-1) = a(n-4) + a(n-5) for n>4.
a(n) = (1+i^(2*n)-(1+3*i)*i^(-n)-(1-3*i)*i^n+2*n*i^(2n))/8 where i=sqrt(-1).
abs(a(-n-2)) = A246552(n). (End)
E.g.f.: (-3*sin(x) - cos(x) + x*sinh(x) - (x - 1)*cosh(x))/4. - Ilya Gutkovskiy, May 29 2016
a(n) = cos(n*Pi)*(2*n+1-2*cos(n*Pi/2)+cos(n*Pi)+6*sin(n*Pi/2))/8. - Wesley Ivan Hurt, Oct 01 2017
a(n) = (-1)^n*(n - 2*floor((n+1)/4) - floor((n+2)/4)). - Ridouane Oudra, Dec 10 2023
MAPLE
A131730:=n->(1+I^(2*n)-(1+3*I)*I^(-n)-(1-3*I)*I^n+2*n*I^(2*n))/8: seq(A131730(n), n=0..100); # Wesley Ivan Hurt, May 29 2016
MATHEMATICA
Table[(1+I^(2n)-(1+3*I)*I^(-n)-(1-3*I)*I^n+2*n*I^(2 n))/8, {n, 0, 80}] (* Wesley Ivan Hurt, May 29 2016 *)
LinearRecurrence[{-1, 0, 0, 1, 1}, {0, -1, 1, 0, 1}, 50] (* G. C. Greubel, May 29 2016 *)
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Sep 17 2007
STATUS
approved