|
|
A108520
|
|
Expansion of 1/(1+2*x+2*x^2).
|
|
21
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Pisano period lengths: 1, 1, 8, 1, 4, 8, 24, 1, 24, 4, 40, 8, 12, 24, 8, 1, 16, 24, 72, 4, ... - R. J. Mathar, Aug 10 2012
|
|
LINKS
|
|
|
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) = -(-1-i)^(n-1) - (-1+i)^(n-1), where i=sqrt(-1).
a(n) = -2*A009116(n-1) for n > 0. (End)
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
|
|
MAPLE
|
A108520 := n -> `if`(n=0, 1, (-2)^n*hypergeom([1/2-n/2, -n/2], [-n], 2)):
|
|
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 *)
|
|
PROG
|
(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])
(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
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|