login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A133186 Period 4: repeat [1, 2, 1, -4]. 0

%I

%S 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,

%T -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,

%U 2,1,-4,1,2,1,-4,1,2,1,-4,1,2,1,-4

%N Period 4: repeat [1, 2, 1, -4].

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,-1).

%F a(n) = (1/4)*{-5*(n mod 4)+5*[(n+1) mod 4]+[(n+2) mod 4]-[(n+3) mod 4]}. - _Paolo P. Lava_, Oct 24 2007

%F a(n) = -[(3/2)*I]*I^n+(-1)^n+[(3/2)*I]*(-I)^n. - _Paolo P. Lava_, Jul 17 2008

%F G.f.: 1/(1+x)+3x/(1+x^2). a(n) = (-1)^n+3*A056594(n-1). [_R. J. Mathar_, Oct 30 2008]

%F From _Wesley Ivan Hurt_, Jul 09 2016: (Start)

%F a(n) + a(n-1) + a(n-2) + a(n-3) = 0 for n>2, a(n) = a(n-4) for n>3.

%F a(n) = cos(n*Pi) + 3*sin(n*Pi/2). (End)

%p seq(op([1, 2, 1, -4]), n=0..40); # _Wesley Ivan Hurt_, Jul 09 2016

%t PadRight[{}, 100, {1, 2, 1, -4}] (* _Wesley Ivan Hurt_, Jul 09 2016 *)

%o (MAGMA) &cat [[1, 2, 1, -4]^^30]; // _Wesley Ivan Hurt_, Jul 09 2016

%Y Cf. A056594, A109008.

%K sign,easy

%O 0,2

%A _Paul Curtz_, Oct 07 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 12:42 EDT 2019. Contains 322209 sequences. (Running on oeis4.)