This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A000142 Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters). (Formerly M1675 N0659) 1928

%I M1675 N0659

%S 1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,

%T 6227020800,87178291200,1307674368000,20922789888000,355687428096000,

%U 6402373705728000,121645100408832000,2432902008176640000,51090942171709440000,1124000727777607680000

%N Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters).

%C The earliest publication that discusses this sequence appears to be the Sepher Yezirah [Book of Creation], circa AD 300. (See Knuth, also the Zeilberger link) - _N. J. A. Sloane_, Apr 07 2014

%C For n >= 1, a(n) is the number of n X n (0,1) matrices with each row and column containing exactly one entry equal to 1.

%C This sequence is the BinomialMean transform of A000354. (See A075271 for definition.) - _John W. Layman_, Sep 12 2002 [This is easily verified from the Paul Barry formula for A000354, by interchanging summations and using the formula: Sum_k (-1)^k C(n-i, k) = KroneckerDelta(i,n). - _David Callan_, Aug 31 2003]

%C Number of distinct subsets of T(n-1) elements with 1 element A, 2 elements B,..., n - 1 elements X (e.g., at n = 5, we consider the distinct subsets of ABBCCCDDDD and there are 5! = 120). - _Jon Perry_, Jun 12 2003

%C n! is the smallest number with that prime signature. E.g., 720 = 2^4 * 3^2 * 5. - _Amarnath Murthy_, Jul 01 2003

%C a(n) is the permanent of the n X n matrix M with M(i, j) = 1. - _Philippe Deléham_, Dec 15 2003

%C Given n objects of distinct sizes (e.g., areas, volumes) such that each object is sufficiently large to simultaneously contain all previous objects, then n! is the total number of essentially different arrangements using all n objects. Arbitrary levels of nesting of objects are permitted within arrangements. (This application of the sequence was inspired by considering leftover moving boxes.) If the restriction exists that each object is able or permitted to contain at most one smaller (but possibly nested) object at a time, the resulting sequence begins 1,2,5,15,52 (Bell Numbers?). Sets of nested wooden boxes or traditional nested Russian dolls come to mind here. - _Rick L. Shepherd_, Jan 14 2004

%C From _Michael Somos_, Mar 04 2004; edited by _M. F. Hasler_, Jan 02 2015: (Start)

%C Stirling transform of [2, 2, 6, 24, 120, ...] is A052856 = [2, 2, 4, 14, 76, ...].

%C Stirling transform of [1, 2, 6, 24, 120, ...] is A000670 = [1, 3, 13, 75, ...].

%C Stirling transform of [0, 2, 6, 24, 120, ...] is A052875 = [0, 2, 12, 74, ...].

%C Stirling transform of [1, 1, 2, 6, 24, 120, ...] is A000629 = [1, 2, 6, 26, ...].

%C Stirling transform of [0, 1, 2, 6, 24, 120, ...] is A002050 = [0, 1, 5, 25, 140, ...].

%C Stirling transform of (A165326*A089064)(1...) = [1, 0, 1, -1, 8, -26, 194, ...] is [1, 1, 2, 6, 24, 120, ...] (this sequence). (End)

%C First Eulerian transform of 1, 1, 1, 1, 1, 1... The first Eulerian transform transforms a sequence s to a sequence t by the formula t(n) = Sum_{k=0..n} e(n, k)s(k), where e(n, k) is a first-order Eulerian number [A008292]. - _Ross La Haye_, Feb 13 2005

%C Conjecturally, 1, 6, and 120 are the only numbers which are both triangular and factorial. - Christopher M. Tomaszewski (cmt1288(AT)comcast.net), Mar 30 2005

%C n! is the n-th finite difference of consecutive n-th powers. E.g., for n = 3, [0, 1, 8, 27, 64, ...] -> [1, 7, 19, 37, ...] -> [6, 12, 18, ...] -> [6, 6, ...]. - Bryan Jacobs (bryanjj(AT)gmail.com), Mar 31 2005

%C a(n+1) = (n+1)! = 1, 2, 6, ... has e.g.f. 1/(1-x)^2. - _Paul Barry_, Apr 22 2005

%C Write numbers 1 to n on a circle. Then a(n) = sum of the products of all n - 2 adjacent numbers. E.g., a(5) = 1*2*3 + 2*3*4 + 3*4*5 + 4*5*1 +5*1*2 = 120. - _Amarnath Murthy_, Jul 10 2005

%C The number of chains of maximal length in the power set of {1, 2, ..., n} ordered by the subset relation. - _Rick L. Shepherd_, Feb 05 2006

%C The number of circular permutations of n letters for n >= 0 is 1, 1, 1, 2, 6, 24, 120, 720, 5040, 40320, ... - Xavier Noria (fxn(AT)hashref.com), Jun 04 2006

%C a(n) is the number of deco polyominoes of height n (n >= 1; see definitions in the Barcucci et al. references). - _Emeric Deutsch_, Aug 07 2006

%C a(n) is the number of partition tableaux of size n. See Steingrimsson/Williams link for the definition. - _David Callan_, Oct 06 2006

%C Consider the n! permutations of the integer sequence [n] = 1, 2, ..., n. The i-th permutation consists of ncycle(i) permutation cycles. Then, if the Sum_{i=1..n!} 2^ncycle(i) runs from 1 to n!, we have Sum_{i=1..n!} 2^ncycle(i) = (n+1)!. E.g., for n = 3 we have ncycle(1) = 3, ncycle(2) = 2, ncycle(3) = 1, ncycle(4) = 2, ncycle(5) = 1, ncycle(6) = 2 and 2^3 + 2^2 + 2^1 + 2^2 + 2^1 + 2^2 = 8 + 4 + 2 + 4 + 2 + 4 = 24 = (n+1)!. - _Thomas Wieder_, Oct 11 2006

%C a(n) is the number of set partitions of {1, 2, ..., 2n - 1, 2n} into blocks of size 2 (perfect matchings) in which each block consists of one even and one odd integer. For example, a(3) = 6 counts 12-34-56, 12-36-45, 14-23-56, 14-25-36, 16-23-45, 16-25-34. - _David Callan_, Mar 30 2007

%C Consider the multiset M = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, ...] = [1, 2, 2, ..., n x 'n'] and form the set U (where U is a set in the strict sense) of all subsets N (where N may be a multiset again) of M. Then the number of elements |U| of U is equal to (n+1)!. E.g. for M = [1, 2, 2] we get U = [[], [2], [2, 2], [1], [1, 2], [1, 2, 2]] and |U| = 3! = 6. This observation is a more formal version of the comment given already by _Rick L. Shepherd_, Jan 14 2004. - _Thomas Wieder_, Nov 27 2007

%C For n >= 1, a(n) = 1, 2, 6, 24, ... are the positions corresponding to the 1's in decimal expansion of Liouville's constant (A012245). - _Paul Muljadi_, Apr 15 2008

%C Triangle A144107 has n! for row sums (given n > 0) with right border n! and left border A003319, the INVERTi transform of (1, 2, 6, 24, ...). - _Gary W. Adamson_, Sep 11 2008

%C Equals INVERT transform of A052186: (1, 0, 1, 3, 14, 77, ...) and row sums of triangle A144108. - _Gary W. Adamson_, Sep 11 2008

%C From _Abdullahi Umar_, Oct 12 2008: (Start)

%C a(n) is also the number of order-decreasing full transformations (of an n-chain).

%C a(n-1) is also the number of nilpotent order-decreasing full transformations (of an n-chain). (End)

%C n! is also the number of optimal broadcast schemes in the complete graph K_{n}, equivalent to the number of binomial trees embedded in K_{n} (see Calin D. Morosan, Information Processing Letters, 100 (2006), 188-193). - Calin D. Morosan (cd_moros(AT)alumni.concordia.ca), Nov 28 2008

%C Sum_{n >= 0} 1/a(n) = e. - _Jaume Oliver Lafont_, Mar 03 2009

%C Let S_{n} denote the n-star graph. The S_{n} structure consists of n S_{n-1} structures. This sequence gives the number of edges between the vertices of any two specified S_{n+1} structures in S_{n+2} (n >= 1). - _K.V.Iyer_, Mar 18 2009

%C Chromatic invariant of the sun graph S_{n-2}.

%C It appears that a(n+1) is the inverse binomial transform of A000255. - Timothy Hopper (timothyhopper(AT)hotmail.co.uk), Aug 20 2009

%C a(n) is also the determinant of an square matrix, An, whose coefficients are the reciprocals of beta function: a{i, j} = 1/beta(i, j), det(An) = n!. - _Enrique Pérez Herrero_, Sep 21 2009

%C The asymptotic expansions of the exponential integrals E(x, m = 1, n = 1) ~ exp(-x)/x*(1 - 1/x + 2/x^2 - 6/x^3 + 24/x^4 + ...) and E(x, m = 1, n = 2) ~ exp(-x)/x*(1 - 2/x + 6/x^2 - 24/x^3 + ...) lead to the factorial numbers. See A163931 and A130534 for more information. - _Johannes W. Meijer_, Oct 20 2009

%C Satisfies A(x)/A(x^2), A(x) = A173280. - _Gary W. Adamson_, Feb 14 2010

%C a(n) = A173333(n,1). - _Reinhard Zumkeller_, Feb 19 2010

%C a(n) = G^n where G is the geometric mean of the first n positive integers. - _Jaroslav Krizek_, May 28 2010

%C Increasing colored 1-2 trees with choice of two colors for the rightmost branch of nonleaves. - _Wenjin Woan_, May 23 2011

%C Number of necklaces with n labeled beads of 1 color. - _Robert G. Wilson v_, Sep 22 2011

%C The sequence 1!, (2!)!, ((3!)!)!, (((4!)!)!)!, ..., ((...(n!)!)...)! (n times) grows too rapidly to have its own entry. See Hofstadter.

%C The e.g.f. of 1/a(n) = 1/n! is BesselI(0, 2*sqrt(x)). See Abramowitz-Stegun, p. 375, 9.3.10. - _Wolfdieter Lang_, Jan 09 2012

%C a(n) is the length of the n-th row which is the sum of n-th row in triangle A170942. - _Reinhard Zumkeller_, Mar 29 2012

%C Number of permutations of elements 1, 2, ..., n + 1 with a fixed element belonging to a cycle of length r does not depend on r and equals a(n). - _Vladimir Shevelev_, May 12 2012

%C a(n) is the number of fixed points in all permutations of 1, ..., n: in all n! permutations, 1 is first exactly (n-1)! times, 2 is second exactly (n-1)! times, etc., giving (n-1)!*n = n!. - _Jon Perry_, Dec 20 2012

%C For n >= 1, a(n-1) is the binomial transform of A000757. See Moreno-Rivera. - _Luis Manuel Rivera Martínez_, Dec 09 2013

%C Each term is divisible by its digital root (A010888). - _Ivan N. Ianakiev_, Apr 14 2014

%C For m >= 3, a(m-2) is the number hp(m) of acyclic Hamiltonian paths in a simple graph with m vertices, which is complete except for one missing edge. For m < 3, hp(m)=0. - _Stanislav Sykora_, Jun 17 2014

%C a(n) = A245334(n,n). - _Reinhard Zumkeller_, Aug 31 2014

%C a(n) is the number of increasing forests with n nodes. - _Brad R. Jones_, Dec 01 2014

%C Sum_{n>=0} a(n)/(a(n + 1)*a(n + 2)) = Sum_{n>=0} 1/((n + 2)*(n + 1)^2*a(n)) = 2 - exp(1) - gamma + Ei(1) = 0.5996203229953..., where gamma = A001620, Ei(1) = A091725. - _Ilya Gutkovskiy_, Nov 01 2016

%C The factorial numbers can be calculated by means of the recurrence n! = (floor(n/2)!)^2 * sf(n) where sf(n) are the swinging factorials A056040. This leads to an efficient algorithm if sf(n) is computed via prime factorization. For an exposition of this algorithm see the link below. - _Peter Luschny_, Nov 05 2016

%C Treeshelves are ordered (plane) binary (0-1-2) increasing trees where the nodes of outdegree 1 come in 2 colors. There are n! treeshelves of size n, and classical Françon's bijection maps bijectively treeshelves into permutations. - _Sergey Kirgizov_, Dec 26 2016

%C Satisfies Benford's law [Diaconis, 1977; Berger-Hill, 2017] - _N. J. A. Sloane_, Feb 07 2017

%C a(n) = Sum((d_p)^2), where d_p is the number of standard tableaux in the Ferrers board of the integer partition p and summation is over all integer partitions p of n. Example: a(3) = 6. Indeed, the partitions of 3 are [3], [2,1], and [1,1,1], having 1, 2, and 1 standard tableaux, respectively; we have 1^2 + 2^2 + 1^2 = 6. - _Emeric Deutsch_, Aug 07 2017

%C a(n) is the n-th derivative of x^n. - _Iain Fox_, Nov 19 2017

%C a(n) is the number of maximum chains in the n-dimensional Boolean cube {0,1}^n in respect to the relation "precedes". It is defined as follows: for arbitrary vectors u, v of {0,1}^n, such that u=(u_1, u_2, ..., u_n) and v=(v_1, v_2, ..., v_n), "u precedes v" if u_i <= v_i, for i=1, 2, ..., n. - _Valentin Bakoev_, Nov 20 2017

%C a(n) is the number of all shortest paths (for example, obtained by Breadth First Search) between the nodes (0,0,...,0) (i.e., the all-zero vector) and (1,1,...,1) (i.e., the all-ones vector) in the graph H_n, corresponding to the n-dimensional Boolean cube {0,1}^n. The graph is defined as H_n= (V_n, E_n), where V_n is the set of all vectors of {0,1}^n, and E_n contains edges formed by each pair adjacent vectors. - _Valentin Bakoev_, Nov 20 2017

%D M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 833.

%D A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 125; also p. 90, ex. 3.

%D Diaconis, Persi, The distribution of leading digits and uniform distribution mod 1, Ann. Probability, 5, 1977, 72--81,

%D Douglas R. Hofstadter, Fluid concepts & creative analogies: computer models of the fundamental mechanisms of thought, Basic Books, 1995, pages 44-46.

%D 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 D. E. Knuth, The Art of Computer Programming, Vol. 3, Section 5.1.2, p. 623. [From _N. J. A. Sloane_, Apr 07 2014]

%D A. P. Prudnikov, Yu. A. Brychkov and O. I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992.

%D R. W. Robinson, Counting arrangements of bishops, pp. 198-214 of Combinatorial Mathematics IV (Adelaide 1975), Lect. Notes Math., 560 (1976).

%D Sepher Yezirah [Book of Creation], circa AD 300. See verse 52.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%D D. Stanton and D. White, Constructive Combinatorics, Springer, 1986; see p. 91.

%D Carlo Suares, Sepher Yetsira, Shambhala Publications, 1976. See verse 52.

%D D. Wells, The Penguin Dictionary of Curious and Interesting Numbers, pp. 102 Penguin Books 1987.

%H N. J. A. Sloane, <a href="/A000142/b000142.txt">The first 100 factorials: Table of n, n! for n = 0..100</a>

%H M. Abramowitz and I. A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].

%H S. B. Akers and B. Krishnamurthy, <a href="http://dx.doi.org/10.1109/12.21148">A group-theoretic model for symmetric interconnection networks</a>, IEEE Trans. Comput., 38(4), April 1989, 555-566.

%H Masanori Ando, <a href="http://arxiv.org/abs/1504.04121">Odd number and Trapezoidal number</a>, arXiv:1504.04121 [math.CO], 2015.

%H David Applegate and N. J. A. Sloane, <a href="/A000142/a000142.txt.gz">Table giving cycle index of S_0 through S_40 in Maple format</a> [gzipped]

%H C. Banderier, M. Bousquet-Mélou, A. Denise, P. Flajolet, D. Gardy and D. Gouyou-Beauchamps, <a href="http://dx.doi.org/10.1016/S0012-365X(01)00250-3">Generating Functions for Generating Trees</a>, Discrete Mathematics 246(1-3), March 2002, pp. 29-55.

%H Stefano Barbero, Umberto Cerruti, Nadir Murru, <a href="https://doi.org/10.1007/s11587-018-0389-5">On the operations of sequences in rings and binomial type sequences</a>, Ricerche di Matematica (2018), pp 1-17., also <a href="https://arxiv.org/abs/1805.11922">arXiv:1805.11922</a> [math.NT], 2018.

%H E. Barcucci, A. Del Lungo and R. Pinzani, <a href="http://dx.doi.org/10.1016/0304-3975(95)00199-9">"Deco" polyominoes, permutations and random generation</a>, Theoretical Computer Science, 159, 1996, 29-42.

%H E. Barcucci, A. Del Lungo, R. Pinzani and R. Sprugnoli, <a href="http://www.emis.de/journals/SLC/opapers/s31barc.html">La hauteur des polyominos dirigés verticalement convexes</a>, Actes du 31e Séminaire Lotharingien de Combinatoire, Publ. IRMA, Université Strasbourg I (1993).

%H Jean-Luc Baril, Sergey Kirgizov, Vincent Vajnovszki, <a href="https://arxiv.org/abs/1611.07793">Patterns in treeshelves</a>, arXiv:1611.07793 [cs.DM], 2016.

%H A. Berger and T. P. Hill, <a href="http://www.ams.org/publications/journals/notices/201702/rnoti-p132.pdf">What is Benford's Law?</a>, Notices, Amer. Math. Soc., 64:2 (2017), 132-134.

%H M. Bhargava, <a href="http://dx.doi.org/10.2307/2695734">The factorial function and generalizations</a>, Amer. Math. Monthly, 107 (Nov. 2000), 783-799.

%H Henry Bottomley, <a href="/A000142/a000142.gif">Illustration of initial terms</a>

%H Douglas Butler, <a href="http://www.tsm-resources.com/alists/fact.html">Factorials!</a>

%H David Callan, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL7/Callan/callan91.html">Counting Stabilized-Interval-Free Permutations</a>, Journal of Integer Sequences, Vol. 7 (2004), Article 04.1.8.

%H Peter J. Cameron, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL3/groups.html">Sequences realized by oligomorphic permutation groups</a>, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.

%H Robert M. Dickau, <a href="http://mathforum.org/advanced/robertd/permutations.html">Permutation diagrams</a>

%H Philippe Flajolet and Robert Sedgewick, <a href="http://algo.inria.fr/flajolet/Publications/books.html">Analytic Combinatorics</a>, 2009; see page 18

%H J. Françon, <a href="http://www.numdam.org/numdam-bin/item?id=ITA_1976__10_3_35_0">Arbres binaires de recherche : propriétés combinatoires et applications</a>, Revue française d'automatique informatique recherche opérationnelle, Informatique théorique, 10 no. 3 (1976), pp. 35-50.

%H H. Fripertinger, <a href="http://www-ang.kfunigraz.ac.at/~fripert/fga/k1elsn.html">The elements of the symmetric group</a>

%H H. Fripertinger, <a href="http://www-ang.kfunigraz.ac.at/~fripert/fga/k1elsncyc.html">The elements of the symmetric group in cycle notation</a>

%H Joël Gay, Vincent Pilaud, <a href="https://arxiv.org/abs/1804.06572">The weak order on Weyl posets</a>, arXiv:1804.06572 [math.CO], 2018.

%H A. M. Ibrahim, <a href="http://www.nntdm.net/papers/nntdm-19/NNTDM-19-2-30_42.pdf">Extension of factorial concept to negative numbers</a>, Notes on Number Theory and Discrete Mathematics, Vol. 19, 2013, 2, 30-42.

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=20">Encyclopedia of Combinatorial Structures 20</a>

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=297">Encyclopedia of Combinatorial Structures 297</a>

%H Milan Janjic, <a href="http://www.pmfbl.org/janjic/">Enumerative Formulas for Some Functions on Finite Sets</a>

%H M. Janjic, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL15/Janjic/janjic42.html">Determinants and Recurrence Sequences</a>, Journal of Integer Sequences, 2012, Article 12.3.5. - _N. J. A. Sloane_, Sep 16 2012

%H B. R. Jones, <a href="http://summit.sfu.ca/item/14554">On tree hook length formulas, Feynman rules and B-series</a>, p. 22, Master's thesis, Simon Fraser University, 2014.

%H Clark Kimberling, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL6/Kimberling/kimberling24.html">Matrix Transformations of Integer Sequences</a>, J. Integer Seqs., Vol. 6, 2003.

%H G. Labelle et al., <a href="http://dx.doi.org/10.1016/S0012-365X(01)00257-6">Stirling numbers interpolation using permutations with forbidden subsequences</a>, Discrete Math. 246 (2002), 177-195.

%H Wolfdieter Lang, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL3/LANG/lang.html">On generalizations of Stirling number triangles</a>, J. Integer Seqs., Vol. 3 (2000), #00.2.4.

%H John W. Layman, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL4/LAYMAN/hankel.html">The Hankel Transform and Some of its Properties</a>, J. Integer Sequences, 4 (2001), #01.1.5.

%H Paul Leyland, <a href="http://www.leyland.vispa.com/numth/factorization/cullen_woodall/gcw.htm">Generalized Cullen and Woodall numbers</a>

%H Peter Luschny, <a href="/A000142/a000142.pdf">Swing, divide and conquer the factorial</a>, (excerpt).

%H Rutilo Moreno and Luis Manuel Rivera, <a href="http://arxiv.org/abs/1306.5708">Blocks in cycles and k-commuting permutations</a>, arXiv:1306:5708 [math.CO], 2013-2014.

%H Thomas Morrill, <a href="https://arxiv.org/abs/1804.08067">Further Development of "Non-Pythagorean" Musical Scales Based on Logarithms</a>, arXiv:1804.08067 [math.HO], 2018.

%H T. S. Motzkin, <a href="/A000262/a000262.pdf">Sorting numbers for cylinders and other classification numbers</a>, in Combinatorics, Proc. Symp. Pure Math. 19, AMS, 1971, pp. 167-176. [Annotated, scanned copy]

%H N. E. Nørlund, <a href="http://www-gdz.sub.uni-goettingen.de/cgi-bin/digbib.cgi?PPN373206070">Vorlesungen ueber Differenzenrechnung</a> Springer 1924, p. 98.

%H R. Ondrejka, <a href="http://dx.doi.org/10.1090/S0025-5718-70-99856-X">1273 exact factorials</a>, Math. Comp., 24 (1970), 231.

%H Enrique Pérez Herrero, <a href="http://psychedelic-geometry.blogspot.com/2009/09/beta-function-matrix-determinant.html">Beta function matrix determinant </a> Psychedelic Geometry blogspot-09/21/09

%H Alexsandar Petojevic, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL5/Petojevic/petojevic5.html">The Function vM_m(s; a; z) and Some Well-Known Sequences</a>, Journal of Integer Sequences, Vol. 5 (2002), Article 02.1.7

%H Fred Richman, <a href="http://math.fau.edu/Richman/long.htm">Multiple precision arithmetic(Computing factorials up to 765!)</a>

%H Luis Manuel Rivera, <a href="http://arxiv.org/abs/1406.3081">Integer sequences and k-commuting permutations</a>, arXiv preprint arXiv:1406.3081 [math.CO], 2014-2015.

%H Michael Z. Spivey and Laura L. Steil, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL9/Spivey/spivey7.html">The k-Binomial Transforms and the Hankel Transform</a>, Journal of Integer Sequences, Vol. 9 (2006), Article 06.1.1.

%H R. P. Stanley, <a href="http://www-math.mit.edu/~rstan/papers/comb.pdf">A combinatorial miscellany</a>

%H R. P. Stanley, <a href="http://dx.doi.org/10.1090/S0273-0979-02-00966-7">Recent Progress in Algebraic Combinatorics</a>, Bull. Amer. Math. Soc., 40 (2003), 55-68.

%H Einar Steingrimsson and Lauren K. Williams, <a href="http://arxiv.org/abs/math/0507149">Permutation tableaux and permutation patterns</a>, arXiv:math/0507149 [math.CO], 2005-2006.

%H A. Umar, <a href="http://dx.doi.org/10.1017/S0308210500015031">On the semigroups of order-decreasing finite full transformations</a>, Proc. Roy. Soc. Edinburgh 120A (1992), 129-142.

%H G. Villemin's Almanach of Numbers, <a href="http://villemin.gerard.free.fr/Wwwgvmm/Compter/SixFact.htm">Factorielles</a>

%H Sage Weil, <a href="http://www.newdream.net/~sage/old/numbers/fact.htm">The First 999 Factorials</a> [broken link]

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Factorial.html">Factorial</a>, <a href="http://mathworld.wolfram.com/GammaFunction.html">Gamma Function</a>, <a href="http://mathworld.wolfram.com/Multifactorial.html">Multifactorial</a>, <a href="http://mathworld.wolfram.com/Permutation.html">Permutation</a>, <a href="http://mathworld.wolfram.com/PermutationPattern.html">Permutation Pattern</a>, <a href="http://mathworld.wolfram.com/LaguerrePolynomial.html">Laguerre Polynomial</a>, <a href="http://mathworld.wolfram.com/DiagonalMatrix.html">Diagonal Matrix</a>, <a href="http://mathworld.wolfram.com/ChromaticInvariant.html">Chromatic Invariant</a>.

%H R. W. Whitty, <a href="http://dx.doi.org/10.1016/j.disc.2007.07.054">Rook polynomials on two-dimensional surfaces and graceful labellings of graphs</a>, Discrete Math., 308 (2008), 674-683.

%H Wikipedia, <a href="http://www.wikipedia.org/wiki/Factorial">Factorial</a>

%H D. Zeilberger, <a href="http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimPDF/king.pdf">King Solomon and Rabbi Ben Ezra's Evaluations of Pi and Patriarch Abraham's Analysis of an Algorithm</a>.

%H <a href="/index/Cor#core">Index entries for "core" sequences</a>

%H <a href="/index/Di#divseq">Index to divisibility sequences</a>

%H <a href="/index/Fa#factorial">Index entries for sequences related to factorial numbers</a>

%H <a href="/index/Be#Benford">Index entries for sequences related to Benford's law</a>

%F Exp(x) = Sum_{m >= 0} x^m/m!. - _Mohammad K. Azarian_, Dec 28 2010

%F Sum_{i=0..n} (-1)^i * i^n * binomial(n, i) = (-1)^n * n!. - Yong Kong (ykong(AT)curagen.com), Dec 26 2000

%F Sum_{i=0..n} (-1)^i * (n-i)^n * binomial(n, i) = n!. - Peter C. Heinig (algorithms(AT)gmx.de), Apr 10 2007

%F The sequence trivially satisfies the recurrence a(n+1) = Sum_{k=0..n} binomial(n,k) * a(k)*a(n-k). - _Robert FERREOL_, Dec 05 2009

%F a(n) = n*a(n-1), n >= 1. n! ~ sqrt(2*Pi) * n^(n+1/2) / e^n (Stirling's approximation).

%F a(0) = 1, a(n) = subs(x = 1, (d^n/dx^n)(1/(2-x))), n = 1, 2, ... - _Karol A. Penson_, Nov 12 2001

%F E.g.f.: 1/(1-x).

%F a(n) = Sum_{k=0..n} (-1)^(n-k)*A000522(k)*binomial(n, k) = Sum_{k=0..n} (-1)^(n-k)*(x+k)^n*binomial(n, k). - _Philippe Deléham_, Jul 08 2004

%F Binomial transform of A000166. - _Ross La Haye_, Sep 21 2004

%F a(n) = Sum_{i=1..n} ((-1)^(i-1) * sum of 1..n taken n - i at a time) - e.g., 4! = (1*2*3 + 1*2*4 + 1*3*4 + 2*3*4) - (1*2 + 1*3 + 1*4 + 2*3 + 2*4 + 3*4) + (1 + 2 + 3 + 4) - 1 = (6 + 8 + 12 + 24) - (2 + 3 + 4 + 6 + 8 + 12) + 10 - 1 = 50 - 35 + 10 - 1 = 24. - _Jon Perry_, Nov 14 2005

%F a(n) = (n-1)*(a(n-1) + a(n-2)), n >= 2. - Matthew J. White, Feb 21 2006

%F 1 / a(n) = determinant of matrix whose (i,j) entry is (i+j)!/(i!(j+1)!) for n > 0. This is a matrix with Catalan numbers on the diagonal. - _Alexander Adamchuk_, Jul 04 2006

%F Hankel transform of A074664. - _Philippe Deléham_, Jun 21 2007

%F For n >= 2, a(n-2) = (-1)^n*Sum_{j=0..n-1} (j+1)*stirling1(n,j+1). - _Milan Janjic_, Dec 14 2008

%F From _Paul Barry_, Jan 15 2009: (Start)

%F G.f.: 1/(1-x-x^2/(1-3x-4x^2/(1-5x-9x^2/(1-7x-16x^2/(1-9x-25x^2....(continued fraction), hence Hankel transform is A055209.

%F G.f. of (n+1)! is 1/(1-2x-2x^2/(1-4x-6x^2/(1-6x-12x^2/(1-8x-20x^2.... (continued fraction), hence Hankel transform is A059332. (End)

%F a(n) = Prod_{p prime} p^{Sum_{k > 0} [n/p^k]} by Legendre's formula for the highest power of a prime dividing n!. - _Jonathan Sondow_, Jul 24 2009

%F a(n) = A053657(n)/A163176(n) for n > 0. - _Jonathan Sondow_, Jul 26 2009

%F It appears that a(n) = (1/0!) + (1/1!)*n + (3/2!)*n*(n-1) + (11/3!)*n*(n-1)*(n-2) + ... + (b(n)/n!)*n*(n-1)*...*2*1, where a(n) = (n+1)! and b(n) = A000255. - _Timothy Hopper_, Aug 12 2009

%F a(n) = a(n-1)^2/a(n-2) + a(n-1), n >= 2. - _Jaume Oliver Lafont_, Sep 21 2009

%F a(n) = Gamma(n+1). - _Enrique Pérez Herrero_, Sep 21 2009

%F a(n) = A_{n}(1) where A_{n}(x) are the Eulerian polynomials. - _Peter Luschny_, Aug 03 2010

%F a(n) = n*(2*a(n-1) - (n-1)*a(n-2)), n > 1. - _Gary Detlefs_, Sep 16 2010

%F 1/a(n) = -Sum_{k=1..n+1} (-2)^k*(n+k+2)*a(k)/(a(2*k+1)*a(n+1-k)). - _Groux Roland_, Dec 08 2010

%F From _Vladimir Shevelev_, Feb 21 2011: (Start)

%F a(n) = Product_{p prime, p <= n} p^(Sum_{i >= 1} floor(n/p^i);

%F The infinitary analog of this formula is: a(n) = prod{q terms of A050376 <= n} q^((n)_q), where (n)_q denotes the number of those numbers <=n for which q is an infinitary divisor (for the definition see comment in A037445). (End)

%F The terms are the denominators of the expansion of sinh(x) + cosh(x). - _Arkadiusz Wesolowski_, Feb 03 2012

%F G.f.: 1 / (1 - x / (1 - x / (1 - 2*x / (1 - 2*x / (1 - 3*x / (1 - 3*x / ... )))))). - _Michael Somos_, May 12 2012

%F G.f. 1 + x/(G(0)-x) where G(k) = 1 - (k+1)*x/(1 - x*(k+2)/G(k+1)); (continued fraction, 2-step). - _Sergei N. Gladkovskii_, Aug 14 2012

%F G.f.: W(1,1;-x)/(W(1,1;-x) - x*W(1,2;-x)), where 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)]. - _Sergei N. Gladkovskii_, Aug 15 2012

%F From _Sergei N. Gladkovskii_, Dec 26 2012. (Start)

%F G.f.: A(x) = 1 + x/(G(0) - x) where G(k) = 1 + (k+1)*x - x*(k+2)/G(k+1); (continued fraction).

%F Let B(x) be the g.f. for A051296, then A(x) = 2 - 1/B(x).(End)

%F G.f.: 1 + x*(G(0) - 1)/(x-1) where G(k) = 1 - (2*k+1)/(1-x/(x - 1/(1 - (2*k+2)/(1-x/(x - 1/G(k+1) ))))); (continued fraction). - _Sergei N. Gladkovskii_, Jan 15 2013

%F G.f.: 1 + x*(1 - G(0))/(sqrt(x)-x) where G(k) = 1 - (k+1)*sqrt(x)/(1-sqrt(x)/(sqrt(x)-1/G(k+1) )); (continued fraction). - _Sergei N. Gladkovskii_, Jan 25 2013

%F G.f.: 1 + x/G(0) where G(k) = 1 - x*(k+2)/( 1 - x*(k+1)/G(k+1) ); (continued fraction). - _Sergei N. Gladkovskii_, Mar 23 2013

%F a(n) = det(S(i+1, j), 1 <= i, j <=n ), where S(n,k) are Stirling numbers of the second kind. - _Mircea Merca_, Apr 04 2013

%F G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(k+1)/(x*(k+1) + 1/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 24 2013

%F G.f.: 2/G(0), where G(k) = 1 + 1/(1 - 1/(1 - 1/(2*x*(k+1)) + 1/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 29 2013

%F G.f.: G(0), where G(k) = 1 + x*(2*k+1)/(1 - x*(2*k+2)/(x*(2*k+2) + 1/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, Jun 07 2013

%F a(n) = P(n-1, floor(n/2)) * floor(n/2)! * (n - (n-2)*((n+1) mod 2)), where P(n, k) are the k-permutations of n objects, n > 0. - _Wesley Ivan Hurt_, Jun 07 2013

%F a(n) = a(n-2)*(n-1)^2 + a(n-1), n > 1. - _Ivan N. Ianakiev_, Jun 18 2013

%F a(n) = a(n-2)*(n^2-1) - a(n-1), n > 1. - _Ivan N. Ianakiev_, Jun 30 2013

%F G.f.: 1 + x/Q(0),m=+2, where Q(k) = 1 - 2*x*(2*k+1) - m*x^2*(k+1)*(2*k+1)/( 1 - 2*x*(2*k+2) - m*x^2*(k+1)*(2*k+3)/Q(k+1) ); (continued fraction). - _Sergei N. Gladkovskii_, Sep 24 2013

%F a(n) = Product_{i = 1..n} A014963^[n/i] = Product_{i = 1..n} A003418([n/i]), where [n] denotes the floor function. - _Matthew Vandermast_, Dec 22 2014

%F a(n) = round(Sum_{k>=1} log(k)^n/k^2), for n>=1, which is related to the n-th derivative of the Riemann zeta function at x=2 as follows: round((-1)^n * zeta^(n)(2)). Also see A073002. - _Richard R. Forberg_, Dec 30 2014

%F a(n) ~ Sum_{j>=0} j^n/e^j, where e = A001113. When substituting a generic variable for "e" this infinite sum is related to Eulerian polynomials. See A008292. This approximation of n! is within 0.4% at n = 2. See A255169. Accuracy, as a percentage, improves rapidly for larger n. - _Richard R. Forberg_, Mar 07 2015

%F a(n) = Product_{k=1..n} (C(n+1, 2)-C(k, 2))/(2*k-1); see Masanori Ando link. - _Michel Marcus_, Apr 17 2015

%F a(2^n) = 2^(2^n - 1) * 1!! * 3!! * 7!! * ... * (2^n - 1)!!. For example, 16! = 2^15*(1*3)*(1*3*5*7)*(1*3*5*7*9*11*13*15) = 20922789888000. - _Peter Bala_, Nov 01 2016

%F a(n)=sum(prod(B)), where the sum is over all subsets B of {1,2,...,n-1} and where prod(B) denotes the product of all the elements of set B. If B is a singleton set with element b, then we define prod(B)=b, and, if B is the empty set, we define prod(B) to be 1. For example, a(4)=(1*2*3)+(1*2)+(1*3)+(2*3)+(1)+(2)+(3)+1=24. - _Dennis P. Walsh_, Oct 23 2017

%e There are 3! = 1*2*3 = 6 ways to arrange 3 letters {a, b, c}, namely abc, acb, bac, bca, cab, cba.

%e Let n = 2. Consider permutations of {1, 2, 3}. Fix element 3. There are a(2) = 2 permutations in each of the following cases: (a) 3 belongs to a cycle of length 1 (permutations (1, 2, 3) and (2, 1, 3)); (b) 3 belongs to a cycle of length 2 (permutations (3, 2, 1) and (1, 3, 2)); (c) 3 belongs to a cycle of length 3 (permutations (2, 3, 1) and (3, 1, 2)). - _Vladimir Shevelev_, May 13 2012

%e G.f. = 1 + x + 2*x^2 + 6*x^3 + 24*x^4 + 120*x^5 + 720*x^6 + 5040*x^7 + ...

%p A000142 := n->n!; [ seq(n!,n=0..20) ];

%p spec := [ S, {S=Sequence(Z) }, labeled ]; [seq(combstruct[count](spec,size=n), n=0..20)];

%p # Maple program for computing cycle indices of symmetric groups

%p M:=40: f:=array(0..M): f[0]:=1: lprint("n= ",0); lprint(f[0]); f[1]:=x[1]: lprint("n= ",1); lprint(f[1]); for n from 2 to M do f[n]:=expand((1/n)*add( x[l]*f[n-l],l=1..n)); lprint("n= ",n); lprint(f[n]); od:

%p with(combstruct):ZL0:=[S,{S=Set(Cycle(Z,card>0))},labeled]: seq(count(ZL0,size=n),n=0..20); # _Zerinvary Lajos_, Sep 26 2007

%t Table[Factorial[n], {n, 0, 20}] (* _Stefan Steinerberger_, Mar 30 2006 *)

%t FoldList[#1 #2 &, 1, Range@ 20] (* _Robert G. Wilson v_, May 07 2011 *)

%t Range[20]! (* _Harvey P. Dale_, Nov 19 2011 *)

%t RecurrenceTable[{a[n] == n*a[n - 1], a[0] == 1}, a, {n, 0, 22}] (* _Ray Chandler_, Jul 30 2015 *)

%o (Axiom) [factorial(n) for n in 0..10]

%o (MAGMA) a:= func< n | Factorial(n) >; [ a(n) : n in [0..10]];

%o a000142 :: (Enum a, Num a, Integral t) => t -> a

%o a000142 n = product [1 .. fromIntegral n]

%o a000142_list = 1 : zipWith (*) [1..] a000142_list

%o -- _Reinhard Zumkeller_, Mar 02 2014, Nov 02 2011, Apr 21 2011

%o (Python)

%o for i in range(1,1000):

%o ....y=i

%o ....for j in range(1,i):

%o .......y=y*(i-j)

%o .......print(y,"\n")

%o (Python)

%o import math

%o for i in range(1,1000):

%o ....math.factorial(i)

%o ....print("")

%o # _Ruskin Harding_, Feb 22 2013

%o (PARI) a(n)=prod(i=1, n, i) \\ _Felix Fröhlich_, Aug 17 2014

%o (PARI) a(n)=n! \\ _Felix Fröhlich_, Aug 17 2014

%o (Sage) [factorial(n) for n in (1..22)] # _Giuseppe Coppoletta_, Dec 05 2014

%Y Cf. A000165, A001044, A001563, A003422, A009445, A010050, A012245, A033312, A034886, A038507, A047920, A048631.

%Y Factorial base representation: A007623.

%Y Cf. A003319, A052186, A144107, A144108. - _Gary W. Adamson_, Sep 11 2008

%Y Complement of A063992. - _Reinhard Zumkeller_, Oct 11 2008

%Y Cf. A053657, A163176. - _Jonathan Sondow_, Jul 26 2009

%Y Cf. A173280. - _Gary W. Adamson_, Feb 14 2010

%Y Boustrophedon transforms: A230960, A230961.

%Y Cf. A233589.

%Y Cf. A245334.

%Y A row of the array in A249026.

%Y Cf. A001013 (multiplicative closure).

%Y For factorials with initial digit d (1 <= d <= 9) see A045509, A045510, A045511, A045516, A045517, A045518, A282021, A045519; A045520, A045521, A045522, A045523, A045524, A045525, A045526, A045527, A045528, A045529.

%K core,easy,nonn,nice

%O 0,3

%A _N. J. A. Sloane_

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

Last modified November 14 02:07 EST 2018. Contains 317159 sequences. (Running on oeis4.)