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

 


Period 6: repeat [1, 2, 5, 8, 7, 4].
4

%I #24 Mar 08 2024 01:12:36

%S 1,2,5,8,7,4,1,2,5,8,7,4,1,2,5,8,7,4,1,2,5,8,7,4,1,2,5,8,7,4,1,2,5,8,

%T 7,4,1,2,5,8,7,4,1,2,5,8,7,4,1,2,5,8,7,4,1,2,5,8,7,4,1,2,5,8,7,4,1,2,

%U 5,8,7,4,1,2,5,8,7,4,1,2,5,8,7,4,1,2

%N Period 6: repeat [1, 2, 5, 8, 7, 4].

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

%F From _R. J. Mathar_, Feb 25 2009, Mar 09 2009: (Start)

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

%F G.f.: (1+x+3*x^2+4*x^3)/((1-x)*(1+x)*(x^2-x+1)). (End)

%F a(n) = (27-cos(n*Pi)-20*cos(n*Pi/3)-4*sqrt(3)*sin(n*Pi/3))/6. - _Wesley Ivan Hurt_, Jun 17 2016

%p A154127:=n->(27-cos(n*Pi)-20*cos(n*Pi/3)-4*sqrt(3)*sin(n*Pi/3))/6: seq(A154127(n), n=0..100); # _Wesley Ivan Hurt_, Jun 17 2016

%t Flatten[Table[{1, 2, 5, 8, 7, 4}, {20}]] (* _Wesley Ivan Hurt_, Jun 17 2016 *)

%o (PARI) a(n)=[1,2,5,8,7,4][n%6+1] \\ _Charles R Greathouse IV_, Jun 02 2011

%o (Magma) &cat[[1, 2, 5, 8, 7, 4]: n in [0..20]]; // _Wesley Ivan Hurt_, Jun 17 2016

%Y Cf. A020806, A029898, A070366, A141425, A146501, A153130.

%K nonn,easy,less

%O 0,2

%A _Paul Curtz_, Jan 05 2009

%E Corrected numerator in g.f _R. J. Mathar_, Mar 09 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 24 03:28 EDT 2024. Contains 376185 sequences. (Running on oeis4.)