login
Period 8: repeat [0, 1, 0, 0, 0, 0, -1, 0].
0

%I #14 Dec 12 2023 08:54:22

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

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

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

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

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

%F a(n) = floor((n-1)/8) - floor((n-2)/8) - floor((n-6)/8) + floor((n-7)/8). - _Wesley Ivan Hurt_, Sep 01 2019

%o (PARI) a(n)=if(n%8==1,1,n%8==6,-1,0) \\ _Charles R Greathouse IV_, Jul 13 2016

%K sign,easy

%O 0,1

%A _Paul Curtz_, Nov 01 2007