login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Period 7: repeat [0, 1, 0, 0, 0, 0, -1].
5

%I #21 Dec 12 2023 07:46:43

%S 0,1,0,0,0,0,-1,0,1,0,0,0,0,-1,0,1,0,0,0,0,-1,0,1,0,0,0,0,-1,0,1,0,0,

%T 0,0,-1,0,1,0,0,0,0,-1,0,1,0,0,0,0,-1,0,1,0,0,0,0,-1,0,1,0,0,0,0,-1,0,

%U 1,0,0,0,0,-1,0,1,0,0,0,0,-1,0,1,0,0,0,0,-1,0,1,0,0,0,0,-1

%N Period 7: repeat [0, 1, 0, 0, 0, 0, -1].

%C This sequence is called B(n) in a comment on A234044 where it appears, together with five others, in a formula for 2*exp(2*Pi*n*I/7). See A234044 for details, also for the n = 4 example.

%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*(1 - x^5)/(1 - x^7).

%F a(n+7) = a(n), n >= 0, a(k) = 0 for k = 0, 2, 3, 4, 5 and a(1) = -a(6) = 1.

%F From _Wesley Ivan Hurt_, Jul 18 2016: (Start)

%F a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5) + a(n-6) = 0 for n>5.

%F a(n) = floor(n/7) - floor((1+n)/7) - floor((5+n)/7) + floor((6+n)/7). (End)

%p seq(op([0, 1, 0, 0, 0, 0, -1]), n=0..20); # _Wesley Ivan Hurt_, Jul 18 2016

%t PadRight[{}, 100, {0, 1, 0, 0, 0, 0, -1}] (* _Wesley Ivan Hurt_, Jul 18 2016 *)

%o (PARI) a(n)=(n+1)^6%7 - (n+6)^6%7 \\ _Charles R Greathouse IV_, Jul 17 2016

%o (Magma) &cat [[0, 1, 0, 0, 0, 0, -1]^^20]; // _Wesley Ivan Hurt_, Jul 18 2016

%Y Cf. A234044, A234045, A234046, A238468, A238470.

%K sign,easy

%O 0

%A _Wolfdieter Lang_, Feb 27 2014