login
Period 6: repeat [1, 1, 2, -1, 2, 1].
0

%I #17 Dec 12 2023 09:33:53

%S 1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,

%T 2,-1,2,1,1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,2,

%U -1,2,1,1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,2,-1,2,1,1,1,2

%N Period 6: repeat [1, 1, 2, -1, 2, 1].

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,1).

%F |a(n)| = A131718(n).

%F a(n) = A131717(n+1) - A131717(n).

%F O.g.f.: (1+x+2*x^2-x^3+2*x^4+x^5)/((1-x)*(1+x)*(x^2+x+1)*(x^2-x+1)). - _R. J. Mathar_, Jul 07 2008

%F a(n) = (3+2*(-1)^n+cos(n*Pi/3)-3*cos(n*Pi/3)^2+3*sin(n*Pi/3)^2)/3. - _Wesley Ivan Hurt_, Jun 24 2022

%t Flatten[Table[{1, 1, 2, -1, 2, 1}, {20}]] (* _Wesley Ivan Hurt_, Jun 24 2022 *)

%t PadRight[{},120,{1,1,2,-1,2,1}] (* _Harvey P. Dale_, Oct 10 2023 *)

%Y Cf. A131717, A131718.

%K sign,easy

%O 0,3

%A _Paul Curtz_, Sep 23 2007

%E Edited by _R. J. Mathar_, Jul 07 2008