cp's OEIS Frontend

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.

A133942 a(n) = (-1)^n * n!.

This page as a plain text file.
%I A133942 #111 Jun 08 2025 02:43:09
%S A133942 1,-1,2,-6,24,-120,720,-5040,40320,-362880,3628800,-39916800,
%T A133942 479001600,-6227020800,87178291200,-1307674368000,20922789888000,
%U A133942 -355687428096000,6402373705728000,-121645100408832000,2432902008176640000
%N A133942 a(n) = (-1)^n * n!.
%C A133942 A variant of A000142, the factorial numbers. - _N. J. A. Sloane_, Oct 03 2007
%C A133942 The terms of this sequences form the factorial series which Euler called the divergent series par excellence.
%C A133942 Euler summed this series to 0.596347... (A073003 = Gompertz's constant).
%C A133942 Sum_{n>=0} 1/a(n) = 1/e. - _Jaume Oliver Lafont_, Mar 03 2009
%C A133942 A002104(n+1) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - _Michael Somos_, Apr 30 2012
%C A133942 a(n) = A048594(2*n+1, n+1). - _Reinhard Zumkeller_, Mar 02 2014
%C A133942 log(1+x) = Sum_{n>=1} a(n-1)/n!*x^n. - _James R. Buddenhagen_, May 24 2015
%C A133942 It seems that a(n) is the determinant of n+1 X n+1 matrix whose elements are m(i,j) = quotient(i/j) + remainder(i/j). - _Andres Cicuttin_, Feb 11 2018
%D A133942 A. N. Khovanskii. The Application of Continued Fractions and Their Generalizations to Problem in Approximation Theory. Groningen: Noordhoff, Netherlands, 1963. See p. 141 (10.19)
%D A133942 R. Roy, Sources in the Development of Mathematics, Cambridge University Press, 2011. See p. 186.
%H A133942 Iain Fox, <a href="/A133942/b133942.txt">Table of n, a(n) for n = 0..449</a> (first 161 terms from Vincenzo Librandi)
%H A133942 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 A133942 V. S. Varadarajan, <a href="http://dx.doi.org/10.1090/S0273-0979-07-01175-5">Euler and his Work on Infinite Series</a>, Bull. Amer. Math. Soc., 44 (No. 4, 2007), 515-539. (See p. 527 and 530.)
%H A133942 <a href="/index/Fa#factorial">Index entries for sequences related to factorial numbers</a>
%F A133942 Sum_{i=0..n} (-1)^i * i^n * binomial(n, i) = (-1)^n * n!. - Yong Kong (ykong(AT)curagen.com), Dec 26 2000
%F A133942 Stirling transform of a(n) = [1, -1, 2, -6, 24, ...] is A000007(n) = [1, 0, 0, 0, 0, ...].
%F A133942 a(n) = -n * a(n-1) unless n=0. a(n) = (-1)^n * A000142(n).
%F A133942 E.g.f.: 1/(1 + x).
%F A133942 G.f.: integral(t=1/x,infinity, (e^-t)/t) e^(1/x)/x = 1/(1 + x/(1 + x/(1 + 2*x/(1 + 2*x/(1 + 3*x/(1 + 3*x/(1 + ...))))))).
%F A133942 Convolution inverse of A158882. HANKEL transform is A055209. PSUM transform is A058006. BIN1 transform is A002741(n+1). - _Michael Somos_, Apr 30 2012
%F A133942 G.f.: 1 - x/(G(0)+x) where G(k) = 1 + (k+1)*x/(1 + x*(k+2)/G(k+1)), G(0) = W(1,1;x)/W(1,2;x), W(a,b,x) = 1 - a*b*x/1! + a*(a+1)*b*(b+1)*x^2/2! - ... + a*(a+1)*...*(a+n-1)*b*(b+1)*...*(b+n-1)*x^n/n! + ...; see [A. N. Khovanskii, p. 141 (10.19)]; (continued fraction, 2-step). - _Sergei N. Gladkovskii_, Aug 14 2012
%F A133942 G.f.: 1/U(0) where U(k) = 1 + x*(k+1)/(1 + x*(k+1)/U(k+1)); (continued fraction, 2-step). - _Sergei N. Gladkovskii_, Oct 15 2012
%F A133942 a(n) = (-1)^n*det(S(i+1,j)|, 1 <= i,j <= n), where S(n,k) are Stirling numbers of the second kind. - _Mircea Merca_, Apr 06 2013
%F A133942 G.f.: 2/G(0), where G(k)= 1 + 1/(1 - 2*x*(k+1)/(2*x*(k+1) + 1 + 2*x*(k+1)/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 30 2013
%F A133942 E.g.f.: 1/(1 + x)= G(0), where G(k) = 1 - x*(k+1)*(k+2)/(1 + (k+1)/G(k+1) ); (continued fraction). - _Sergei N. Gladkovskii_, Jan 29 2014
%F A133942 For n >= 1, a(n) = round(zeta^(n)(2)), where zeta^(n) is the n-th derivative of the Riemann zeta function. - _Iain Fox_, Nov 13 2017
%F A133942 a(n) = (n+1)^(n+1) * Integral_{x=0..1} (x*log(x))^n dx. - _Peter James Foreman_, Oct 27 2018
%e A133942 G.f. = 1 - x + 2*x^2 - 6*x^3 + 24*x^4 - 120*x^5 + 720*x^6 - 5040*x^7 + ...
%p A133942 seq((-1)^n*factorial(n),n=0..20); # _Muniru A Asiru_, Oct 27 2018
%t A133942 nn=20;CoefficientList[Series[1/(1+x),{x,0,nn}],x]Range[0,nn]! (* or *)
%t A133942 RecurrenceTable[{a[0]==1,a[n]==-n*a[n-1]},a[n],{n,20}] (* _Harvey P. Dale_, May 10 2011 and slightly modified by _Robert G. Wilson v_, Feb 12 2018 *)
%t A133942 a[n_] := (-1)^n*n!; Array[a, 22, 0] (* _Robert G. Wilson v_, Feb 11 2018 *)
%t A133942 Times@@@Partition[Riffle[Range[0,30]!,{1,-1}],2] (* _Harvey P. Dale_, Dec 30 2019 *)
%o A133942 (PARI) {a(n) = if( n<0, 0, (-1)^n * n! )};
%o A133942 (Magma) [(-1)^n * Factorial(n): n in [0..25]]; // _Vincenzo Librandi_, May 12 2011
%o A133942 (Haskell)
%o A133942 a133942 n = a133942_list !! n
%o A133942 a133942_list = zipWith (*) a000142_list $ cycle [1, -1]
%o A133942 -- _Reinhard Zumkeller_, Mar 02 2014
%o A133942 (Python)
%o A133942 import math
%o A133942 for n in range(0, 25): print((-1)**n*math.factorial(n), end=', ') # _Stefano Spezia_, Oct 27 2018
%o A133942 (GAP) List([0..20],n->(-1)^n*Factorial(n)); # _Muniru A Asiru_, Oct 27 2018
%Y A133942 Partial sums are A058006.
%Y A133942 Alternating row sums of A048994.
%Y A133942 Also, a(n) = A048994(n+1,1).
%Y A133942 Cf. A000142, A002104, A002741, A055209, A158882.
%K A133942 sign,easy
%O A133942 0,3
%A A133942 _Michael Somos_, Sep 30 2007