login
A133186
Period 4: repeat [1, 2, 1, -4].
0
1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4, 1, 2, 1, -4
OFFSET
0,2
FORMULA
G.f.: 1/(1+x)+3x/(1+x^2). a(n) = (-1)^n+3*A056594(n-1). [R. J. Mathar, Oct 30 2008]
From Wesley Ivan Hurt, Jul 09 2016: (Start)
a(n) + a(n-1) + a(n-2) + a(n-3) = 0 for n>2, a(n) = a(n-4) for n>3.
a(n) = cos(n*Pi) + 3*sin(n*Pi/2). (End)
MAPLE
seq(op([1, 2, 1, -4]), n=0..40); # Wesley Ivan Hurt, Jul 09 2016
MATHEMATICA
PadRight[{}, 100, {1, 2, 1, -4}] (* Wesley Ivan Hurt, Jul 09 2016 *)
PROG
(Magma) &cat [[1, 2, 1, -4]^^30]; // Wesley Ivan Hurt, Jul 09 2016
CROSSREFS
Sequence in context: A324892 A059150 A087230 * A084236 A068057 A376645
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Oct 07 2007
STATUS
approved