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 A132954 #25 Dec 12 2023 08:52:15 %S A132954 1,2,4,-1,-2,-4,1,2,4,-1,-2,-4,1,2,4,-1,-2,-4,1,2,4,-1,-2,-4,1,2,4,-1, %T A132954 -2,-4,1,2,4,-1,-2,-4,1,2,4,-1,-2,-4,1,2,4,-1,-2,-4,1,2,4,-1,-2,-4,1, %U A132954 2,4,-1,-2,-4,1,2,4,-1,-2,-4,1,2,4,-1,-2,-4,1,2 %N A132954 Period 6: repeat [1, 2, 4, -1, -2, -4]. %C A132954 Nonsimple continued fraction expansion of (5+sqrt(13))/6 = 1.434258545... - _R. J. Mathar_, Mar 08 2012 %H A132954 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,-1). %F A132954 a(n) = -a(n-3) for n>2. G.f.: (1+2*x+4*x^2)/((1+x)*(x^2-x+1)). [_R. J. Mathar_, Apr 13 2010] %F A132954 a(n) = cos(n*Pi) + 2*sqrt(3)*sin(n*Pi/3). - _Wesley Ivan Hurt_, Jun 20 2016 %p A132954 A132954:=n->[1, 2, 4, -1, -2, -4][(n mod 6)+1]: seq(A132954(n), n=0..100); # _Wesley Ivan Hurt_, Jun 20 2016 %t A132954 PadRight[{}, 100, {1, 2, 4, -1, -2, -4}] (* _Wesley Ivan Hurt_, Jun 20 2016 *) %o A132954 (PARI) a(n)=(2^n%7)*(-1)^(n%6>2) \\ _Jaume Oliver Lafont_, Mar 24 2009 %o A132954 (Magma) &cat [[1, 2, 4, -1, -2, -4]^^20]; // _Wesley Ivan Hurt_, Jun 20 2016 %K A132954 sign,easy %O A132954 0,2 %A A132954 _Paul Curtz_, Nov 19 2007