This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A058006 #27 Feb 16 2025 08:32:43 %S A058006 1,0,2,-4,20,-100,620,-4420,35900,-326980,3301820,-36614980,442386620, %T A058006 -5784634180,81393657020,-1226280710980,19696509177020, %U A058006 -335990918918980,6066382786809020,-115578717622022980,2317323290554617020,-48773618881154822980 %N A058006 Alternating factorials: 0! - 1! + 2! - ... + (-1)^n n! %C A058006 From _Harry Richman_, Aug 13 2024: (Start) %C A058006 Euler argued this sequence converges to 0.596347... (A073003 = Gompertz's constant); see Lagarias Section 2.5. %C A058006 This sequence converges in the p-adic topology, for every prime number p. (End) %H A058006 Reinhard Zumkeller, <a href="/A058006/b058006.txt">Table of n, a(n) for n = 0..400</a> %H A058006 Jeffrey C. Lagarias, <a href="https://doi.org/10.1090/S0273-0979-2013-01423-X">Euler's constant: Euler's work and modern developments</a>, Bull. Amer. Math. Soc., Vol. 50, No. 4 (2013), pp. 527-628; <a href="http://arxiv.org/abs/1303.1856">preprint</a>, arXiv:1303.1856 [math.NT], 2013. %H A058006 Eric Weisstein's MathWorld, <a href="https://mathworld.wolfram.com/IncompleteGammaFunction.html">Incomplete Gamma Function</a>. %F A058006 a(n) = (-1)^n n! + a(n-1) = A005165(n)(-1)^n + 1. %F A058006 a(n) = -(n-1)*a(n-1) + n*a(n-2), n>0. %F A058006 E.g.f.: d/dx ((GAMMA(0,1)-GAMMA(0,1+x))*exp(1+x)). - _Max Alekseyev_, Jul 05 2010 %F A058006 G.f.: G(0)/(1-x), where G(k)= 1 - (2*k + 1)*x/( 1 - 2*x*(k+1)/(2*x*(k+1) - 1/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 24 2013 %F A058006 0 = a(n)*(-a(n+1) + a(n+3)) + a(n+1)*(2*a(n+1) - 2*a(n+2) -a(n+3)) + a(n+2)*(a(n+2)) if n>=-1. - _Michael Somos_, Jan 28 2014 %F A058006 a(n) = exp(1)*Gamma(0,1) + (-1)^n*exp(1)*(n+1)!*Gamma(-n-1,1), where Gamma(a,x) is the upper incomplete Gamma function. - _Vladimir Reshetnikov_, Oct 29 2015 %e A058006 a(5) = 0!-1!+2!-3!+4!-5! = 1-1+2-6+24-120 = -100. %e A058006 G.f. = 1 + 2*x^2 - 4*x^3 + 20*x^4 - 100*x^5 + 620*x^6 - 4420*x^7 + 35900*x^8 + ... %t A058006 a[ n_] := Sum[ (-1)^k k!, {k, 0, n}]; (* _Michael Somos_, Jan 28 2014 *) %o A058006 (PARI) {a(n) = sum(k=0, n, (-1)^k * k!)}; /* _Michael Somos_, Jan 28 2014 */ %o A058006 (Haskell) %o A058006 a058006 n = a058006_list !! n %o A058006 a058006_list = scanl1 (+) a133942_list %o A058006 -- _Reinhard Zumkeller_, Mar 02 2014 %Y A058006 Cf. A000142, A003422, A005165, A153229 (absolute values), A136580. %Y A058006 Partial sums of A133942. %K A058006 easy,sign %O A058006 0,3 %A A058006 _Henry Bottomley_, Nov 13 2000 %E A058006 Corrections and more information from _Michael Somos_, Feb 19 2003