%I #23 Oct 02 2023 11:34:39
%S 1,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,
%T -1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,
%U 0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1,2,-1,0,0,-1
%N Expansion of (1 - x) * (1 - x^4) / (1 - x^5) in powers of x.
%C This sequence with a(0) replaced by 2 appears, together with three other sequences, in the formula 2*exp(2*Pi*n*I/5) = 2*T(n,x) + S(n-1,x)*sqrt(2+phi)*I, with x = (phi-1)/2 and I = sqrt(-1), where phi = (1+sqrt(5))/2 (golden section) after reduction of powers using phi^2 = phi+1. T and S are Chebyshev polynomials from A053120 and A049310. This results in 2*exp(2*Pi*n*I/5) = (A(n) + B(n)*phi) + (C(n) + D(n)*phi)*sqrt(2+phi)*I, with A(n) = a(n+5), B(n) = A080891(n), C(n) = A156174(n+4) and D(n) = A010891(n+3) for n >= 0. - _Wolfdieter Lang_, Feb 26 2014
%H G. C. Greubel, <a href="/A164116/b164116.txt">Table of n, a(n) for n = 0..10000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (-1, -1, -1, -1).
%F Euler transform of length 5 sequence [-1, 0, 0, -1, 1].
%F a(n) = a(-n) for all n in Z. a(n+5) = a(n) unless n=0 or n=-5.
%F G.f.: (1 - x^4)/(1 + x + x^2 + x^3 + x^4).
%F a(n) = (-1)^n * A164118(n). Convolution inverse of A164115.
%F a(n) = 2*0^mod(n,5) - 0^n - mod(mod(n+2,5),2). - _Wesley Ivan Hurt_, Apr 28 2015
%e G.f. = 1 - x - x^4 + 2*x^5 - x^6 - x^9 + 2*x^10 - x^11 - x^14 + 2*x^15 - x^16 + ...
%e exp(2*Pi*3*I/5) = (0 - phi) + (1 - phi)*sqrt(2+phi)*I, with phi = (1+sqrt(5))/2. - _Wolfdieter Lang_, Feb 26 2014
%t CoefficientList[Series[(1-x)(1-x^4)/(1-x^5),{x,0,110}],x] (* _Harvey P. Dale_, Sep 25 2013 *)
%o (PARI) {a(n) = -(n==0) + [2, -1, 0, 0, -1][n%5 + 1]};
%o (Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 - x^4)/(1+x+x^2+x^3+x^4))); // _G. C. Greubel_, Sep 22 2018
%Y Cf. A164115, A164118.
%K sign,easy
%O 0,6
%A _Michael Somos_, Aug 10 2009