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 A131714 #14 Dec 12 2023 09:15:40 %S A131714 1,-2,2,-1,2,-2,1,-2,2,-1,2,-2,1,-2,2,-1,2,-2,1,-2,2,-1,2,-2,1,-2,2, %T A131714 -1,2,-2,1,-2,2,-1,2,-2,1,-2,2,-1,2,-2,1,-2,2,-1,2,-2,1,-2,2,-1,2,-2, %U A131714 1,-2,2,-1,2,-2,1,-2,2,-1,2,-2,1,-2,2,-1,2,-2,1,-2 %N A131714 Period 6: repeat [1, -2, 2, -1, 2, -2]. %H A131714 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,-1). %F A131714 G.f.: (1-2*x+2*x^2)/(x+1)/(x^2-x+1). - _R. J. Mathar_, Nov 14 2007 %F A131714 From _Wesley Ivan Hurt_, Jun 19 2016: (Start) %F A131714 a(n) + a(n-3) = 0 for n>2. %F A131714 a(n) = (5*cos(n*Pi)-2*cos(n*Pi/3))/3. (End) %p A131714 A131714:=n->[1, -2, 2, -1, 2, -2][(n mod 6)+1]: seq(A131714(n), n=0..100); # _Wesley Ivan Hurt_, Jun 19 2016 %t A131714 PadRight[{}, 200, {1, -2, 2, -1, 2, -2}] (* _Wesley Ivan Hurt_, Jun 19 2016 *) %o A131714 (Magma) &cat[[1, -2, 2, -1, 2, -2]^^20]; // _Wesley Ivan Hurt_, Jun 19 2016 %Y A131714 Cf. A130196, A131556. %K A131714 sign,easy %O A131714 0,2 %A A131714 _Paul Curtz_, Sep 14 2007