login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

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

%I #25 Sep 08 2022 08:46:03

%S 4,1,0,-3,4,1,0,-3,4,1,0,-3,4,1,0,-3,4,1,0,-3,4,1,0,-3,4,1,0,-3,4,1,0,

%T -3,4,1,0,-3,4,1,0,-3,4,1,0,-3,4,1,0,-3,4,1,0,-3,4,1,0,-3,4,1,0,-3,4,

%U 1,0,-3,4,1,0,-3,4,1,0,-3,4,1,0,-3,4,1,0,-3

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

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

%F a(n) = (3*(-1)^n+1)/2 + 2*(-1)^((2*n-1+(-1)^n)/4).

%F a(n) = A168361(n+1) + A084100(n+4).

%F G.f.: (4+x-3*x^3) / ((1-x)*(1+x)*(1+x^2)). - _R. J. Mathar_, Mar 10 2013

%F a(n+4) = a(n). - _Alexander R. Povolotsky_, Mar 15 2013

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

%F a(n) = 1/2+3*I^(2*n)/2+(1+I)*I^(-n)+(1-I)*I^n.

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

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

%t PadRight[{},100,{4,1,0,-3}] (* or *) LinearRecurrence[{0,0,0,1},{4,1,0,-3},100] (* _Harvey P. Dale_, Nov 28 2014 *)

%o (Magma) for n in [0 .. 50] do (3*(-1)^n+1)/2 + 2*(-1)^((2*n-1+(-1)^n)/4); end for;

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

%o (PARI) a(n)=[4, 1, 0, -3][n%4+1] \\ _Charles R Greathouse IV_, Jul 17 2016

%Y Cf. A084100, A168361, A214864.

%K sign,easy

%O 0,1

%A _Brad Clardy_, Mar 10 2013

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 07:20 EDT 2024. Contains 371235 sequences. (Running on oeis4.)