A108520 Expansion of 1/(1+2*x+2*x^2).
1, -2, 2, 0, -4, 8, -8, 0, 16, -32, 32, 0, -64, 128, -128, 0, 256, -512, 512, 0, -1024, 2048, -2048, 0, 4096, -8192, 8192, 0, -16384, 32768, -32768, 0, 65536, -131072, 131072, 0, -262144, 524288, -524288, 0, 1048576, -2097152, 2097152, 0, -4194304, 8388608, -8388608
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Maran van Heesch, The multiplicative complexity of symmetric functions over a field with characteristic p, Thesis, 2014.
- Index entries for linear recurrences with constant coefficients, signature (-2,-2).
Crossrefs
Programs
-
Magma
[n le 2 select n*(-1)^(n-1) else -2*(Self(n-1)+Self(n-2)): n in [1..47]]; // Bruno Berselli, Apr 26 2011
-
Maple
A108520 := n -> `if`(n=0, 1, (-2)^n*hypergeom([1/2-n/2, -n/2], [-n], 2)): seq(simplify(A108520(n)), n=0..46); # Peter Luschny, Dec 17 2015
-
Mathematica
CoefficientList[Series[1/(1+2x+2x^2), {x,0,50}], x] (* or *) LinearRecurrence[{-2,-2}, {1,-2}, 50] (* Harvey P. Dale, Sep 30 2012 *) Table[-(-1-I)^(n-1) - (-1+I)^(n-1), {n, 0, 50}] (* Bruno Berselli, Nov 08 2015 *) Im[(-1+I)^Range[51]] (* G. C. Greubel, Apr 24 2023 *)
-
PARI
a(n)=if(n<0, 0, polcoeff(1/(1+2*x+2*x^2)+x*O(x^n),n))
-
PARI
a(n)=if(n<1, n==0, -polsym(2+2*x+x^2,n-1)[n])
-
PARI
vector(66,n,imag((-1+I)^n)) /* Joerg Arndt, May 13 2011 */
-
SageMath
[imag((-1+I)^(n+1)) for n in range(51)] # G. C. Greubel, Apr 24 2023
Formula
G.f.: 1/(1+2*x+2*x^2).
E.g.f.: exp(-x)*(cos(x) - sin(x)).
a(n) = -2*(a(n-1) + a(n-2)).
a(n) = Sum_{k=0..n} Sum_{j=0..n-k} C(k,j)*C(k,n-j)*(-2)^(n-j). - Paul Barry, Mar 09 2006
a(n) = -4 * a(n-4). - Paul Curtz, Apr 24 2011
From Bruno Berselli, Apr 26 2011: (Start)
a(n) = -(-1-i)^(n-1) - (-1+i)^(n-1), where i=sqrt(-1).
a(n) = -2*A009116(n-1) for n > 0. (End)
Imaginary part of (-1+i)^n, negated real part is A090132. - Joerg Arndt, May 13 2011
E.g.f.: (cos(x) - sin(x))*exp(-x) = G(0); G(k) = 1 - 2*x/(4*k+1+x*(4*k+1)/(2*(2*k+1) -x -2*(x^2)*(2*k+1)/((x^2) -(2*k+2)*(4*k+3)/G(k+1)))); (continued fraction). - Sergei N. Gladkovskii, Nov 26 2011
G.f.: G(0)/(2*(1+x)), where G(k) = 1 + 1/(1 - x*(k+1)/(x*(k+2) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 20 2013
a(n) = (-2)^n*hypergeom([1/2-n/2, -n/2], [-n], 2) for n >= 1. - Peter Luschny, Dec 17 2015
Comments