%I #63 Nov 01 2024 23:45:29
%S 0,1,-1,0,-1,1,0,1,-1,0,-1,1,0,1,-1,0,-1,1,0,1,-1,0,-1,1,0,1,-1,0,-1,
%T 1,0,1,-1,0,-1,1,0,1,-1,0,-1,1,0,1,-1,0,-1,1,0,1,-1,0,-1,1,0,1,-1,0,
%U -1,1,0,1,-1,0,-1,1,0,1,-1,0,-1,1,0,1,-1,0,-1,1,0,1,-1,0,-1,1,0,1,-1,0,-1,1,0,1,-1,0,-1
%N Expansion of x*(1-x)/ ((1+x)*(1-x+x^2)) in powers of x.
%C Period 6: repeat [0, 1, -1, 0, -1, 1]. - _Joerg Arndt_, Aug 28 2024
%C Multiplicative with a(2^e) = -1, a(3^e) = 0, a(p^e) = 1 otherwise. - _David W. Wilson_, Jun 12 2005
%C Transform of the Jacobsthal numbers A001045 under the Riordan array A102587. - _Paul Barry_, Jul 14 2005
%C The BINOMIAL transform generates (-1)^(n+1)*A024495(n+1). - _R. J. Mathar_, Apr 07 2008
%H Michael Somos, <a href="http://grail.eecs.csuohio.edu/~somos/rfmc.txt">Rational Function Multiplicative Coefficients</a>.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,-1).
%F a(n) = 2*cos(Pi*n/3)/3 - 2(-1)^n/3.
%F From _Michael Somos_, Apr 10 2011: (Start)
%F Euler transform of length 6 sequence [-1, 0, -1, 0, 0, 1].
%F Moebius transform is length 6 sequence [1, -2, -1, 0, 0, 2].
%F G.f.: x * (1 - x) * (1 - x^3) / (1 - x^6).
%F a(n) = a(-n), a(n + 3) = -a(n), a(3*n) = 0, for all n in Z. (End)
%F a(n) = 3*a(n-1) - a(n-3) + 3*a(n-4). - _Paul Curtz_, Dec 10 2007
%F a(n) = ( (-1)^floor((n+1)/3) - (-1)^n )/2. - _Bruno Berselli_, Jul 09 2013
%F a(n) = S(n-1,-1), n >= 0, with Chebyshev's S-polynomials evaluated at -1 (see A049310). - _Wolfdieter Lang_, Sep 06 2013
%F a(n) = A131531(n+2) - A131531(n+1) . - _R. J. Mathar_, Nov 28 2019
%F a(n) = A128834(n^2). - _Ridouane Oudra_, Oct 30 2024
%F E.g.f.: 2*(exp(x/2)*cos(sqrt(3)*x/2) - cosh(x) + sinh(x))/3. - _Stefano Spezia_, Oct 31 2024
%e G.f. = x - x^2 - x^4 + x^5 + x^7 - x^8 - x^10 + x^11 + x^13 - x^14 - x^16 + x^17 + ...
%p seq(2*sin(Pi*n^2/3)/sqrt(3), n=0..100); # _Ridouane Oudra_, Oct 30 2024
%t a[ n_] := {1, -1, 0, -1, 1, 0}[[Mod[n, 6, 1]]]; (* _Michael Somos_, Aug 25 2014 *)
%t LinearRecurrence[{0,0,-1},{0,1,-1},120] (* or *) PadRight[{},120,{0,1,-1,0,-1,1}] (* _Harvey P. Dale_, Mar 30 2016 *)
%o (PARI) {a(n) = [0, 1, -1, 0, -1, 1][n%6 + 1]}; /* _Michael Somos_, Apr 10 2011 */
%Y Cf. A001045, A049310, A102587, A131531, A128834.
%K sign,easy,mult
%O 0,1
%A _Paul Barry_, Feb 25 2004