cp's OEIS Frontend

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.

A132419 Period 6: repeat [1, 1, -2, -1, -1, 2].

This page as a plain text file.
%I A132419 #22 Dec 12 2023 09:15:08
%S A132419 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,
%T A132419 -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,
%U A132419 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,-1
%N A132419 Period 6: repeat [1, 1, -2, -1, -1, 2].
%H A132419 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,-1).
%F A132419 a(n) = A061347(n+1) * (-1)^floor(n/3).
%F A132419 From _Wesley Ivan Hurt_, Jun 21 2016: (Start)
%F A132419 G.f.: (1+x-2*x^2)/(1+x^3).
%F A132419 a(n) + a(n-3) = 0 for n>2.
%F A132419 a(n) = (5*cos(n*Pi/3) - 2*cos(n*Pi) - sqrt(3)*sin(n*Pi/3))/3. (End)
%p A132419 A132419:=n->[1, 1, -2, -1, -1, 2][(n mod 6)+1]: seq(A132419(n), n=0..100); # _Wesley Ivan Hurt_, Jun 21 2016
%t A132419 PadRight[{}, 100, {1, 1, -2, -1, -1, 2}] (* _Wesley Ivan Hurt_, Jun 21 2016 *)
%o A132419 (PARI) a(n)=[1,1,-2,-1,-1,2][n%6+1] \\ _Charles R Greathouse IV_, Jun 02 2011
%o A132419 (Magma) &cat [[1, 1, -2, -1, -1, 2]^^20]; // _Wesley Ivan Hurt_, Jun 21 2016
%Y A132419 Cf. A061347.
%K A132419 sign,easy,less
%O A132419 0,3
%A A132419 _Paul Curtz_, Nov 13 2007
%E A132419 Comment changed to formula by _Wesley Ivan Hurt_, Jun 21 2016