%I #13 Feb 03 2017 13:13:32
%S 0,0,1,-1,1,-1,2,-2,1,-1,1,-1,0,0,-1,1,-1,1,-2,2,-1,1,-1,1,0,0,1,-1,1,
%T -1,2,-2,1,-1,1,-1,0,0,-1,1,-1,1,-2,2,-1,1,-1,1,0,0,1,-1,1,-1,2,-2,1,
%U -1,1,-1,0,0,-1,1,-1,1,-2,2,-1,1,-1,1,0,0,1,-1,1,-1,2,-2,1,-1,1,-1,0,0,-1,1,-1,1,-2,2,-1,1,-1,1,0,0,1,-1
%N Expansion of -x^2*(x-1)*(x^2-x+1)*(x+x^2+1)/(1-x^4+x^8).
%C It appears that a(n) has period 24.
%C This is true, as (1-x^4+x^8) is the cyclotomic polynomial for n=24. - _Joerg Arndt_, Feb 03 2017
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1,0,0,0,-1).
%F G.f.: -x^2*(x-1)*(x^2-x+1)*(x+x^2+1)/(1-x^4+x^8).
%t CoefficientList[Series[-x^2*(x - 1)*(x^2 - x + 1)*(x + x^2 + 1)/(1 - x^4 + x^8), {x, 0, 100}], x] (* _Wesley Ivan Hurt_, Feb 03 2017 *)
%o (PARI) a(n)=[0, 0, 1, -1, 1, -1, 2, -2, 1, -1, 1, -1, 0, 0, -1, 1, -1, 1, -2, 2, -1, 1, -1, 1][n%24+1] \\ _Charles R Greathouse IV_, Feb 03 2017
%Y Cf. A085846, A111912, A111913, A111914.
%K easy,less,sign
%O 0,7
%A _Creighton Dement_, Aug 20 2005
|