|
|
A131730
|
|
a(4n) = n, a(4n+1) = -n-1, a(4n+2) = n+1, a(4n+3) = -n.
|
|
1
|
|
|
0, -1, 1, 0, 1, -2, 2, -1, 2, -3, 3, -2, 3, -4, 4, -3, 4, -5, 5, -4, 5, -6, 6, -5, 6, -7, 7, -6, 7, -8, 8, -7, 8, -9, 9, -8, 9, -10, 10, -9, 10, -11, 11, -10, 11, -12, 12, -11, 12, -13, 13, -12, 13, -14, 14, -13, 14, -15, 15, -14, 15, -16, 16, -15, 16, -17, 17, -16, 17, -18, 18, -17, 18, -19, 19, -18, 19, -20, 20, -19, 20, -21, 21, -20
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,6
|
|
LINKS
|
|
|
FORMULA
|
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).
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
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|