%I #46 Jan 01 2024 11:06:43
%S 1,-1,-2,8,-8,-16,64,-64,-128,512,-512,-1024,4096,-4096,-8192,32768,
%T -32768,-65536,262144,-262144,-524288,2097152,-2097152,-4194304,
%U 16777216,-16777216,-33554432,134217728,-134217728,-268435456,1073741824,-1073741824,-2147483648,8589934592
%N Expansion of g.f.: (1+x)/(1+2*x+4x^2).
%C a(n+1) is the Hankel transform of C(2n,n)-C(2n+2,n+1). - _Paul Barry_, Mar 14 2008
%C a(n+1) is the Hankel transform of C(2n,n)-2*C(n)=((n-1)/(n+1))*C(2n,n), where C(n)=A000108(n). - _Paul Barry_, Mar 14 2008
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (-2,-4).
%F G.f.: (1+x)/(1+2*x+4x^2).
%F a(n) = -2*a(n-1) - 4*a(n-2).
%F a(n) = 2^n*cos(2*Pi*n/3).
%F a(n) = Sum_{k=0..n} A098158(n,k)*(-1)^k*3^(n-k). - _Philippe Deléham_, Nov 14 2008
%F a(n) = (3^n/2^n)*Product_{i=1..n} (1/3 - tan((i-1/2)*Pi/(2*n))^2). - _Gerry Martens_, May 26 2011
%F G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(3*k+1)/(x*(3*k+4) - 1/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 26 2013
%F a(n) = b(n) + b(n-1) where b(n) = 2^n*A049347(n). - _R. J. Mathar_, May 21 2019
%F Sum_{n>=0} 1/a(n) = -4/7. - _Amiram Eldar_, Feb 14 2023
%p A104537:=n->2^n*cos(2*Pi*n/3): seq(A104537(n), n=0..40); # _Wesley Ivan Hurt_, Nov 16 2014
%t CoefficientList[Series[(1 + x) / (1 + 2 x + 4 x^2), {x, 0, 40}], x] (* _Vincenzo Librandi_, Nov 16 2014 *)
%t LinearRecurrence[{-2,-4},{1,-1},40] (* _Harvey P. Dale_, Dec 02 2019 *)
%o (Magma) I:=[1, -1]; [n le 2 select I[n] else -2*Self(n-1)-4*Self(n-2): n in [1..40]]; // _Vincenzo Librandi_, Nov 16 2014
%Y Cf. A000108, A098158.
%K easy,sign
%O 0,3
%A _Paul Barry_, Mar 13 2005