login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A058006 Alternating factorials: 0! - 1! + 2! - ... + (-1)^n n! 4
1, 0, 2, -4, 20, -100, 620, -4420, 35900, -326980, 3301820, -36614980, 442386620, -5784634180, 81393657020, -1226280710980, 19696509177020, -335990918918980, 6066382786809020, -115578717622022980, 2317323290554617020, -48773618881154822980 (list; graph; refs; listen; history; internal format)
OFFSET

0,3

FORMULA

a(n) = (-1)^n n!+a(n-1) = A005165(n)(-1)^n+1.

a(n) = -(n-1)*a(n-1)+n*a(n-2), n>0.

E.g.f.: d/dx ((GAMMA(0,1)-GAMMA(0,1+x))*exp(1+x)). [From Max Alekseyev (maxale(AT)gmail.com), Jul 05 2010]

EXAMPLE

a(5) = 0!-1!+2!-3!+4!-5! = 1-1+2-6+24-120 = -100.

PROG

(PARI) a(n)=if(n<0, 0, sum(k=0, n, (-1)^k*k!))

CROSSREFS

Cf. A000142, A003422, A005165.

Sequence in context: A188326 A158094 A108879 * A153229 A013329 A102087

Adjacent sequences:  A058003 A058004 A058005 * A058007 A058008 A058009

KEYWORD

easy,sign

AUTHOR

Henry Bottomley (se16(AT)btinternet.com), Nov 13 2000

EXTENSIONS

Corrections and more information from Michael Somos, Feb 19 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 00:09 EST 2012. Contains 205978 sequences.