%I #22 Dec 14 2023 05:21:42
%S 0,0,1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,
%T 0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1,0,0,
%U 0,1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1,0
%N Period 7: repeat [0, 0, 1, 0, 0, -1, 0].
%C This sequence is called C(n) in a comment on A234044, where it appears, together with five others called a,b,c, and A, B, in a formula for 2*exp(2*Pi*n*I/7). See A234044 for details and the example for n = 4.
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,-1,-1,-1,-1).
%F G.f.: x^2*(1 - x^3)/(1 - x^7).
%F a(n+7) = a(n), n >= 0, with a(k) = 0 for k = 0, 1, 3, 4, 6 and a(2) = -a(5) = 1.
%F From _Wesley Ivan Hurt_, Jul 18 2016: (Start)
%F a(n) = floor((1+n)/7) - floor((2+n)/7) - floor((4+n)/7) + floor((5+n)/7).
%F a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5) + a(n-6) for n>5. (End)
%p seq(op([0, 0, 1, 0, 0, -1, 0]), n=0..20); # _Wesley Ivan Hurt_, Jul 18 2016
%t PadRight[{}, 100, {0, 0, 1, 0, 0, -1, 0}] (* _Wesley Ivan Hurt_, Jul 18 2016 *)
%o (PARI) a(n)=[0, 0, 1, 0, 0, -1, 0][n%7+1] \\ _Charles R Greathouse IV_, Jul 13 2016
%o (Magma) &cat [[0, 0, 1, 0, 0, -1, 0]^^20]; // _Wesley Ivan Hurt_, Jul 18 2016
%Y Cf. A234044, A234045, A234046, A238468, A238469.
%K sign,easy
%O 0
%A _Wolfdieter Lang_, Feb 27 2014
|