This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A154127 #24 Mar 08 2024 01:12:36 %S A154127 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 A154127 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 A154127 5,8,7,4,1,2,5,8,7,4,1,2,5,8,7,4,1,2 %N A154127 Period 6: repeat [1, 2, 5, 8, 7, 4]. %H A154127 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,-1,1). %F A154127 From _R. J. Mathar_, Feb 25 2009, Mar 09 2009: (Start) %F A154127 a(n) = a(n-1) - a(n-3) + a(n-4) for n>3. %F A154127 G.f.: (1+x+3*x^2+4*x^3)/((1-x)*(1+x)*(x^2-x+1)). (End) %F A154127 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 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 A154127 Flatten[Table[{1, 2, 5, 8, 7, 4}, {20}]] (* _Wesley Ivan Hurt_, Jun 17 2016 *) %o A154127 (PARI) a(n)=[1,2,5,8,7,4][n%6+1] \\ _Charles R Greathouse IV_, Jun 02 2011 %o A154127 (Magma) &cat[[1, 2, 5, 8, 7, 4]: n in [0..20]]; // _Wesley Ivan Hurt_, Jun 17 2016 %Y A154127 Cf. A020806, A029898, A070366, A141425, A146501, A153130. %K A154127 nonn,easy,less %O A154127 0,2 %A A154127 _Paul Curtz_, Jan 05 2009 %E A154127 Corrected numerator in g.f _R. J. Mathar_, Mar 09 2009