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.

A132708 Period 6: repeat [4, 2, 1, -4, -2, -1].

This page as a plain text file.
%I A132708 #31 Dec 12 2023 08:55:34
%S A132708 4,2,1,-4,-2,-1,4,2,1,-4,-2,-1,4,2,1,-4,-2,-1,4,2,1,-4,-2,-1,4,2,1,-4,
%T A132708 -2,-1,4,2,1,-4,-2,-1,4,2,1,-4,-2,-1,4,2,1,-4,-2,-1,4,2,1,-4,-2,-1,4,
%U A132708 2,1,-4,-2,-1,4,2,1,-4,-2,-1,4,2,1,-4,-2,-1,4,2,1,-4,-2,-1,4,2,1,-4,-2,-1,4,2,1,-4,-2,-1,4,2,1,-4,-2,-1,4,2,1,-4,-2,-1
%N A132708 Period 6: repeat [4, 2, 1, -4, -2, -1].
%C A132708 Old definition was: "First differences of 5^n mod 9".
%H A132708 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,-1).
%F A132708 G.f.: (x^2 + 2*x + 4)/(x^3 + 1). - _Chai Wah Wu_, Jun 04 2016
%F A132708 From _Wesley Ivan Hurt_, Jun 28 2016: (Start)
%F A132708 a(n) + a(n-3) = 0 for n>2.
%F A132708 a(n) = a(n-6) for n>5.
%F A132708 a(n) = cos(n*Pi) + 3*cos(n*Pi/3) + sqrt(3)*sin(n*Pi/3). (End)
%p A132708 A132708:= n -> [4, 2, 1, -4, -2, -1][(n mod 6)+1]: seq(A132708(n), n=0..100); # _Wesley Ivan Hurt_, Jun 28 2016
%t A132708 PadRight[{}, 120, {4, 2, 1, -4, -2, -1}] (* _Harvey P. Dale_, Nov 21 2015 *)
%t A132708 Differences[PowerMod[5, Range[0, 90], 9]] (* _Alonso del Arte_, Jun 04 2016 *)
%o A132708 (Magma) &cat [[4,2,1,-4,-2,-1]^^30]; // _Wesley Ivan Hurt_, Jun 28 2016
%Y A132708 Cf. A070366 (5^n mod 9).
%K A132708 sign,easy
%O A132708 0,1
%A A132708 _Paul Curtz_, Nov 16 2007
%E A132708 Name changed by _Wesley Ivan Hurt_, Jun 28 2016