%I #41 Dec 14 2023 05:32:30
%S 1,-3,-4,-1,3,4,1,-3,-4,-1,3,4,1,-3,-4,-1,3,4,1,-3,-4,-1,3,4,1,-3,-4,
%T -1,3,4,1,-3,-4,-1,3,4,1,-3,-4,-1,3,4,1,-3,-4,-1,3,4,1,-3,-4,-1,3,4,1,
%U -3,-4,-1,3,4,1,-3,-4,-1,3,4,1,-3,-4,-1,3,4,1,-3
%N Expansion of (1-4*x)/(1-x+x^2).
%C Row sums of number triangle A117377.
%C Period 6: repeat [1, -3, -4, -1, 3, 4]. - _Philippe Deléham_, Nov 03 2008
%H Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html">Recursive Sequences</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1).
%F G.f.: (1-4*x)/(1-x+x^2).
%F a(n) = Sum_{k=0..n} (-1)^(n-k) * ( C(k,n-k) + 4*C(k,n-k-1) ).
%F a(n) = a(n-1) - a(n-2) for n>1. [_Philippe Deléham_, Nov 03 2008]
%F a(n) = (1+(-n mod 3))^(n mod 3)*(-1)^floor((n+2)/3). - _Wesley Ivan Hurt_, Aug 31 2014
%F a(n) = (3*cos(n*Pi/3) - 7*sqrt(3)*sin(n*Pi/3))/3. - _Wesley Ivan Hurt_, Jun 23 2016
%F E.g.f.: (3*cos(sqrt(3)*x/2) - 7*sqrt(3)*sin(sqrt(3)*x/2))*exp(x/2)/3. - _Ilya Gutkovskiy_, Jun 27 2016
%p A117378:=n->(1+(-n mod 3))^(n mod 3)*(-1)^floor((n+2)/3): seq(A117378(n), n=0..100); # _Wesley Ivan Hurt_, Aug 31 2014
%t CoefficientList[Series[(1 - 4 x)/(1 - x + x^2), {x, 0, 200}], x] (* _Vladimir Joseph Stephan Orlovsky_, Jun 11 2011 *)
%t LinearRecurrence[{1,-1},{1,-3},100] (* _Harvey P. Dale_, Sep 27 2018 *)
%o (Magma) [(1+(-n mod 3))^(n mod 3)*(-1)^Floor((n+2)/3) : n in [0..100]]; // _Wesley Ivan Hurt_, Aug 31 2014
%Y Cf. A117377.
%K easy,sign
%O 0,2
%A _Paul Barry_, Mar 10 2006