login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A176563
Period 4: repeat [1, -3, 1, 1].
1
1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1, -3, 1, 1, 1
OFFSET
0,2
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
Sequence in context: A060268 A339877 A030328 * A093148 A069292 A368336
KEYWORD
sign,easy
AUTHOR
Jaume Oliver Lafont, Apr 20 2010
STATUS
approved