login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A009116 Expansion of e.g.f. cos(x) / exp(x). 34
1, -1, 0, 2, -4, 4, 0, -8, 16, -16, 0, 32, -64, 64, 0, -128, 256, -256, 0, 512, -1024, 1024, 0, -2048, 4096, -4096, 0, 8192, -16384, 16384, 0, -32768, 65536, -65536, 0, 131072, -262144, 262144, 0, -524288, 1048576, -1048576, 0, 2097152, -4194304 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

Apart from signs, generated by 1,1 position of H_2^n = [1,1;-1,1]^n; and a(n) = 2^(n/2)*cos(Pi*n/2). - Paul Barry, Feb 18 2004

Equals binomial transform of "Period 4, repeat [1, 0, -1, 0]". - Gary W. Adamson, Mar 25 2009

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

N. J. A. Sloane, Table of n, a(n) for n = 0..2000

Beata Bajorska-Harapińska, Barbara Smoleń, and Roman Wituła, On Quaternion Equivalents for Quasi-Fibonacci Numbers, Shortly Quaternaccis, Advances in Applied Clifford Algebras (2019) Vol. 29, 54.

N. J. A. Sloane, Table of n, (I-1)^n for n=0..100

Index entries for linear recurrences with constant coefficients, signature (-2,-2).

FORMULA

Real part of (-1-i)^n. See A009545 for imaginary part. - Marc LeBrun

a(n) = -2 * (a(n-1) + a(n-2)); a(0)=1, a(1)=-1. - Michael Somos, Nov 17 2002

G.f.: (1 + x) / (1 + 2*x + 2*x^2).

E.g.f.: cos(x) / exp(x).

a(n) = Sum_{k=0..n} (-1)^k*A098158(n,k). - Philippe Deléham, Dec 04 2006

a(n)*(-1)^n = A099087(n) - A099087(n-1). - R. J. Mathar, Nov 18 2007

a(n) = (1/2)*((-1-i)^n + (-1+i)^n), with n>=0 and i=sqrt(-1). - Paolo P. Lava, Nov 21 2008

a(n) = (-1)^n*A146559(n). - Philippe Deléham, Dec 01 2008

a(n) = -4*a(n-4); a(n)=A016116(n) * A075553(n+6). - Paul Curtz, Jul 22 2011

E.g.f.: cos(x)/exp(x) = 1-x/(G(0)+1); G(k) = 4k+1-x+(x^2)*(4k+1)/((2k+1)*(4k+3)-(x^2)+x*(2k+1)*(4k+3)/( 2k+2-x+x*(2k+2)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 24 2011

G.f.: G(0)/2, 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) = (-1)^n*2^(n/2)*cos(n*Pi/4). - Nordine Fahssi, Dec 18 2013

a(n) = (-1)^floor((n+1)/2)*2^(n-1)*H(n, n mod 2, 1/2) for n >= 3 where H(n, a, b) = hypergeom([a - n/2, b - n/2], [1 - n], 2). - Peter Luschny, Sep 03 2019

EXAMPLE

1 - x + 2*x^3 - 4*x^4 + 4*x^5 - 8*x^7 + 16*x^8 - 16*x^9 + 32*x^11 - 64*x^12 + ...

MAPLE

A009116 := n->add((-1)^j*binomial(n, 2*j), j=0..floor(n/2));

MATHEMATICA

n = 50; (* n = 2 mod 4 *) (CoefficientList[ Series[ Cos[x]/Exp[x], {x, 0, n}], x]* Table[k!, {k, 0, n - 1}] )[[1 ;; 45]] (* Jean-François Alcover, May 18 2011 *)

Table[(1/2)*((-1 - I)^n + (-1 + I)^n), {n, 0, 50}] (* Jean-François Alcover, Jan 31 2018, after Paolo P. Lava *)

PROG

(PARI) {a(n) = if( n<0, 0, polcoeff( (1 + x) / (1 + 2*x + 2*x^2) + x * O(x^n), n))} /* Michael Somos, Nov 17 2002 */

(Magma) m:=50; R<x>:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!(Cos(x)/Exp(x))); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Jul 22 2018

CROSSREFS

Cf. A009545, A099087, A146559, A098158, A075553, A090132.

(With different signs) row sums of triangle A104597.

Also related to A066321 and A271472.

Sequence in context: A352452 A195479 A112793 * A146559 A118434 A090132

Adjacent sequences: A009113 A009114 A009115 * A009117 A009118 A009119

KEYWORD

sign,easy,nice

AUTHOR

R. H. Hardin

EXTENSIONS

Extended with signs by Olivier Gérard, Mar 15 1997

Definition corrected by Joerg Arndt, Apr 29 2011

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 4 04:59 EST 2022. Contains 358544 sequences. (Running on oeis4.)