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 A131556 #26 Dec 12 2023 09:18:26 %S A131556 1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1, %T A131556 -1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1, %U A131556 1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1 %N A131556 Period 6: repeat [1, -2, 1, -1, 2, -1]. %H A131556 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,-1). %F A131556 G.f.: (x-1)^2/(x+1)/(x^2-x+1). - _R. J. Mathar_, Nov 14 2007 %F A131556 a(n) = (-1)^n * A131534(n). - _R. J. Mathar_, Apr 02 2011 %F A131556 a(n) = -cos(Pi*n/3)/3 -sin(Pi*n/3)/sqrt(3) +4*(-1)^n/3. - _R. J. Mathar_, Oct 08 2011 %F A131556 a(n) + a(n-3) = 0 for n>2. - _Wesley Ivan Hurt_, Jun 19 2016 %p A131556 A131556:=n->[1, -2, 1, -1, 2, -1][(n mod 6)+1]: seq(A131556(n), n=0..100); # _Wesley Ivan Hurt_, Jun 19 2016 %t A131556 PadRight[{}, 100, {1, -2, 1, -1, 2, -1}] (* _Wesley Ivan Hurt_, Jun 19 2016 *) %o A131556 (PARI) a(n)=[1,-2,1,-1,2,-1][n%6+1] \\ _Charles R Greathouse IV_, Jun 02 2011 %o A131556 (Magma) &cat[[1, -2, 1, -1, 2, -1]^^20]; // _Wesley Ivan Hurt_, Jun 19 2016 %Y A131556 Cf. A131534. %K A131556 sign,easy,less %O A131556 0,2 %A A131556 _Paul Curtz_, Aug 27 2007 %E A131556 Edited by _N. J. A. Sloane_, Sep 15 2007