OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (-1,-1,-1).
FORMULA
Sum_{k>=0} a(k)/(k+1) = 0.
a(n) = cos(n*Pi) - 2*sin(n*Pi/2).
G.f.: (1-2*x-x^2)/((1+x)*(1+x^2)).
a(n) = -a(n-1) -a(n-2) -a(n-3) for n>2. [R. J. Mathar, Apr 28 2010]
a(n) = 1-(1-(-1)^n)*(1-I^(n+1)). - Bruno Berselli, Mar 16 2011
Dirichlet generating function: Zeta(s)*(1 - 1/2^(s - 1))^2. [Mats Granvik and Jaume Oliver Lafont, Mar 12 2014]
a(n) = a(n-4) for n>3. - Wesley Ivan Hurt, Jul 07 2016
E.g.f.: exp(-x) - 2*sin(x). - Ilya Gutkovskiy, Jul 07 2016
MAPLE
seq(op([1, -3, 1, 1]), n=0..50); # Wesley Ivan Hurt, Jul 07 2016
MATHEMATICA
PadRight[{}, 100, {1, -3, 1, 1}] (* Wesley Ivan Hurt, Jul 07 2016 *)
PROG
(PARI) a(n)=[1, -3, 1, 1][n%4+1]
(Magma) &cat [[1, -3, 1, 1]^^30]; // Wesley Ivan Hurt, Jul 07 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Jaume Oliver Lafont, Apr 20 2010
STATUS
approved