OFFSET
0,2
COMMENTS
Yet another variation on A009545.
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
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).
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
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 *)
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
Michael Somos, Jun 07 2005
STATUS
approved