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.

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

This page as a plain text file.
%I A178141 #21 Dec 12 2023 07:41:39
%S A178141 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,2,-4,1,
%T A178141 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,2,-4,
%U A178141 1,2,4,-1,2,-4,1,2,4,-1,2,-4,1,2,4,-1,2,-4,1,2
%N A178141 Period 6: repeat [4, -1, 2, -4, 1, 2].
%C A178141 Differences of the period 6: repeat [1, 5, 4, 6, 2, 3] (A070365).
%H A178141 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,1).
%F A178141 Mix A153727(n+1) with -A153727(n).
%F A178141 From _Wesley Ivan Hurt_, Jun 23 2016: (Start)
%F A178141 G.f.: (4-x+2*x^2-4*x^3+x^4+2*x^5)/(1-x^6).
%F A178141 a(n) = a(n-6) for n>5.
%F A178141 a(n) = (2 + 5*cos(n*Pi) + 7*cos(n*Pi/3) - 2*cos(2*n*Pi/3) - sqrt(3)*sin(n*Pi/3) - 2*sqrt(3)*sin(2*n*Pi/3))/3. (End)
%p A178141 A178141:=n->[4, -1, 2, -4, 1, 2][(n mod 6)+1]: seq(A178141(n), n=0..100); # _Wesley Ivan Hurt_, Jun 23 2016
%t A178141 PadRight[{}, 100, {4, -1, 2, -4, 1, 2}] (* _Wesley Ivan Hurt_, Jun 23 2016 *)
%o A178141 (PARI) a(n)=[1,5,4,6,2,3][n%5+1] \\ _Charles R Greathouse IV_, Jun 02 2011
%o A178141 (Magma) &cat [[4, -1, 2, -4, 1, 2]^^20]; // _Wesley Ivan Hurt_, Jun 23 2016
%Y A178141 Cf. A069705, A070365, A132954, A153727.
%K A178141 sign,easy,less
%O A178141 0,1
%A A178141 _Paul Curtz_, May 21 2010
%E A178141 New name from _Wesley Ivan Hurt_, Jun 23 2016