OFFSET
0,5
COMMENTS
Hankel transform of A093387.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,-2,0,-1).
FORMULA
G.f.: -x^2*(1+x)/(1+x^2)^2.
a(n) = floor(n/2)*(sin(n*Pi/2) + cos(n*Pi/2)).
E.g.f.: (x*cos(x) - (1 + x)*sin(x))/2. - Stefano Spezia, Jul 14 2024
MAPLE
MATHEMATICA
With[{c=Table[n (-1)^n, {n, 0, 30}]}, Riffle[c, c]] (* Harvey P. Dale, Jul 21 2013 *)
LinearRecurrence[{0, -2, 0, -1}, {0, 0, -1, -1}, 100] (* Vincenzo Librandi, Nov 18 2018 *)
PROG
(Magma) [(n div 2)*(-1)^(n div 2): n in [0..100]]; // Vincenzo Librandi, Nov 18 2018
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Jan 11 2007
STATUS
approved