|
| |
|
|
A000142
|
|
Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters).
(Formerly M1675 N0659)
|
|
1216
|
|
|
|
1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
0,3
|
|
|
COMMENTS
|
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.
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
Number of distinct subsets of T(n-1) elements with 1 element A, 2 elements B,..., n-1 elements X (e.g. n=5, we consider the distinct subsets of ABBCCCDDDD and there are 5!=120.) - Jon Perry, Jun 12 2003
n! is the smallest number with that prime signature. E.g. 720 = 2^4*3^2*5. - Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Jul 01 2003
a(n) is the permanent of the n X n matrix M with M(i,j) = 1 . - Philippe Deléham, Dec 15 2003
Given n objects of distinct sizes (e.g. areas, volumes) such that each object is sufficiently large simultaneously to contain all previous objects, then n! is the total number of essentially different arrangements using all n objects. Arbitrary levels of nesting of objects is permitted within arrangements. (...sequence inspired by considering left-over moving boxes.). If the restriction exists that each object is only 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
From Michael Somos, Mar 04 2004: (Start)
Stirling transform of a(n) = [2,2,6,24,120,...] is A052856(n) = [2, 2, 4, 14, 76, ...].
Stirling transform of a(n) = [1,2,6,24,120,...] is A000670(n) = [1, 3, 13, 75, ...].
Stirling transform of a(n) = [0,2,6,24,120,...] is A052875(n) = [0, 2, 12, 74, ...].
Stirling transform of a(n-1) = [1,1,2,6,24,...] is A000629(n-1) = [1, 2, 6, 26, ...].
Stirling transform of a(n-1) = [0,1,2,6,24,...] is A002050(n-1) = [0, 1, 5, 25, 140, ...].
Stirling transform of -(-1)^n * A089064(n) = [1, 0, 1, -1, 8, -26, 194, ...] is a(n-1) = [1,1,2,6,24,120,...]. (End)
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[e(n,k)s(k), k=0...n], where e(n,k) is a first-order Eulerian number [A008292]. - Ross La Haye (rlahaye(AT)new.rr.com), Feb 13 2005
Conjecturally, 1, 6, 120 are the only numbers which are both triangular and factorial. - Christopher M. Tomaszewski (cmt1288(AT)comcast.net), Mar 30 2005
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
a(n+1)=(n+1)!=1,2,6,.. has e.g.f. 1/(1-x)^2. - Paul Barry, Apr 22 2005
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 (amarnath_murthy(AT)yahoo.com), Jul 10 2005
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
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
a(n)=number of deco polyominoes of height n (n>=1; see definitions in the Barcucci et al. references). - Emeric Deutsch, Aug 07 2006
a(n) = number of partition tableaux of size n. See Steingrimsson/Williams link for the definition. - David Callan, Oct 06 2006
Consider the n! permutation of the integer sequence [n]=1,2,...,n. The i-th permutation consists of ncycle(i) permutation cycles. Then, if the sum 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
a(n) = 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
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
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
Triangle A144107 has row sums = n!(n>0) with right border n! and left border A003319, the INVERTi transform of (1, 2, 6, 24,...) [From Gary W. Adamson, Sep 11 2008]
Equals INVERT transform of A052186: (1, 0, 1, 3, 14, 77,...) and row sums of triangle A144108. [From Gary W. Adamson, Sep 11 2008]
Contribution from Abdullahi Umar, Oct 12 2008: (Start)
a(n) is also the number of order-decreasing full transformations (of an n-chain).
a(n-1) is also the number of nilpotent order-decreasing full transformations (of an n-chain). (End)
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). [From Calin D. Morosan (cd_moros(AT)alumni.concordia.ca), Nov 28 2008]
Sum_{n>=0} 1/a(n) = e [From Jaume Oliver Lafont, Mar 03 2009]
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 ). [From Kailasam Viswanathan Iyer (kvi(AT)nitt.edu), Mar 18 2009]
Chromatic invariant of the sun graph S_{n-2}
It appears that a(n+1) is the inverse binomial transform of A000255. [From Timothy Hopper (timothyhopper(AT)hotmail.co.uk), Aug 20 2009]
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! [From Barbarel Tres Mil (barbarel3000(AT)yahoo.es), Sep 21 2009]
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. [From Johannes W. Meijer, Oct 20 2009]
Satisfies A(x)/A(x^2), A(x) = A173280. [From Gary W. Adamson, Feb 14 2010]
a(n) = A173333(n,1). [From Reinhard Zumkeller, Feb 19 2010]
a(n) = G^n where G = geometric mean of the first n positive integers. [From Jaroslav Krizek, May 28 2010]
Increasing colored 1-2 trees with choice of two colors for the rightmost branch of nonleaves. [Wenjin Woan, May 23, 2011]
Number of necklaces with n labeled beads of 1 color. - Robert G. Wilson v, Sept 22 2011.
The sequence 1, 2, 720!, 4!!!!, ... ,n!!...! (n times) grows too rapidly to have its own entry. See Hofstadter.
The e.g.f. of 1/a(n)=1/n! is BesselI(0,2*sqrt(x)). See Abramowitz-Stegun, p.375, 9.3.10. [From Wolfdieter Lang, Jan 09 2012]
a(n) = length of n-th row = sum of n-th row in triangle A170942. [Reinhard Zumkeller, Mar 29 2012]
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
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
|
|
|
REFERENCES
|
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.
S. B. Akers and B. Krishnamurthy, "A group-theoretic model for symmetric interconnection networks", IEEE Trans. Comput., 38(4), April 1989, 555-566.
C. Banderier, M. Bousquet-Mélou, A. Denise, P. Flajolet, D. Gardy and D. Gouyou-Beauchamps, <a href="http://algo.inria.fr/banderier/Papers/DiscMath99.ps">Generating functions for generating trees</a>, Discrete Mathematics 246(1-3), March 2002, pp. 29-55.
E. Barcucci, A. Del Lungo and R. Pinzani, "Deco" polyominoes, permutations and random generation, Theoretical Computer Science, 159, 1996, 29-42.
E. Barcucci, A. Del Lungo, R. Pinzani and R. Sprugnoli, La hauteur des polyominos dirige's verticalement convexes, Actes du 31e Se'minaire Lotharingien de Combinatoire, Publ. IRMA, Universite' Strasbourg I (1993).
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.
M. Bhargava, The Factorial Function and Generalizations, Amer. Math. Monthly 107 (2000) 783-799.
Douglas R. Hofstadter, Fluid concepts & creative analogies: computer models of the fundamental mechanisms of thought, Basic Books, 1995, pages 44-46.
M. Janjic, Determinants and Recurrence Sequences, Journal of Integer Sequences, 2012, Article 12.3.5. - From N. J. A. Sloane, Sep 16 2012
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)
G. Labelle et al., Stirling numbers interpolation using permutations with forbidden subsequences, Discrete Math. 246 (2002), 177-195.
R. Ondrejka, 1273 exact factorials, Math. Comp., 24 (1970), 231.
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.
R. W. Robinson, Counting arrangements of bishops, pp. 198-214 of Combinatorial Mathematics IV (Adelaide 1975), Lect. Notes Math., 560 (1976).
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Michael Z. Spivey and Laura L. Steil, The k-Binomial Transforms and the Hankel Transform, Journal of Integer Sequences, Vol. 9 (2006), Article 06.1.1.
R. P. Stanley, Recent Progress in Algebraic Combinatorics, Bull. Amer. Math. Soc., 40 (2003), 55-68.
Umar, A., On the semigroups of order-decreasing finite full transformations, Proc. Roy. Soc. Edinburgh 120A (1992), 129-142.
D. Wells, The Penguin Dictionary of Curious and Interesting Numbers, pp. 102 Penguin Books 1987.
R. W. Whitty, Rook polynomials on two-dimensional surfaces..., Discrete Math., 308 (2008), 674-683.
|
|
|
LINKS
|
N. J. A. Sloane, The first 100 factorials: Table of n, n! for n = 0..100
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
David Applegate and N. J. A. Sloane, Table giving cycle index of S_0 through S_40 in Maple format [gzipped]
H. Bottomley, Illustration of initial terms
D. Butler, Factorials!
David Callan, Counting Stabilized-Interval-Free Permutations, Journal of Integer Sequences, Vol. 7 (2004), Article 04.1.8.
P. J. Cameron, Sequences realized by oligomorphic permutation groups, J. Integ. Seqs. Vol. 3 (2000), #00.1.5.
R. M. Dickau, Permutation diagrams
P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009; see page 18
H. Fripertinger, The elements of the symmetric group
H. Fripertinger, The elements of the symmetric group in cycle notation
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 20
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 297
Milan Janjic, Enumerative Formulas for Some Functions on Finite Sets
C. Kimberling, Matrix Transformations of Integer Sequences, J. Integer Seqs., Vol. 6, 2003.
W. Lang, On generalizations of Stirling number triangles, J. Integer Seqs., Vol. 3 (2000), #00.2.4.
J. W. Layman, The Hankel Transform and Some of its Properties, J. Integer Sequences, 4 (2001), #01.1.5.
Paul Leyland, Generalized Cullen and Woodall numbers
Barbarel Tres Mil, Beta function matrix determinant Psychedelic Geometry blogspot-09/21/09 [From Barbarel Tres Mil (barbarel3000(AT)yahoo.es), Sep 21 2009]
N. E. Noerlund, Vorlesungen ueber Differenzenrechnung Springer 1924, p. 98.
Alexsandar Petojevic, The Function vM_m(s; a; z) and Some Well-Known Sequences, Journal of Integer Sequences, Vol. 5 (2002), Article 02.1.7
F. Richman, Multiple precision arithmetic(Computing factorials up to 765!)
R. P. Stanley, A combinatorial miscellany
Einar Steingrimsson and Lauren K. Williams, Permutation tableaux and permutation patterns
G. Villemin's Almanach of Numbers, Factorielles
A. Walker, Factors of n!+-1
Sage Weil, The First 999 Factorials
Eric Weisstein's World of Mathematics, Factorial, Gamma Function, Multifactorial, Permutation, Permutation Pattern, Laguerre Polynomial, Diagonal Matrix, Chromatic Invariant.
Wikipedia, Factorial
Index entries for "core" sequences
Index to divisibility sequences
Index entries for sequences related to factorial numbers
|
|
|
FORMULA
|
Exp(x) = Sum_{m >= 0} x^m/m!. [From Mohammad K. Azarian, Dec 28 2010]
Sum((-1)^i * i^n * binomial(n, i), i=0..n) = (-1)^n * n! - Yong Kong (ykong(AT)curagen.com), Dec 26 2000
Sum((-1)^i * (n-i)^n * binomial(n, i), i=0..n) = n! - Peter C. Heinig (algorithms(AT)gmx.de), Apr 10 2007
The sequence trivially satisfies the recurrence a(n+1) = sum(binomial(n,k)*a(k)*a(n-k),k=0..n). - Robert Ferreol, Dec 05 2009
a(n)=n*a(n-1), n >= 1. n! ~ sqrt(2*Pi) * n^(n+1/2) / e^n (Stirling's approximation).
a(0)=1, a(n)=subs(x=1, diff(1/(2-x), x$n)), n=1, 2... - Karol A. Penson, Nov 12 2001
E.g.f.: 1/(1-x).
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
Binomial transform of A000166. - Ross La Haye (rlahaye(AT)new.rr.com), Sep 21 2004
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
a(n)=(n-1)*(a(n-1)+a(n-2)), n >= 2. - Matthew J. White (mattjameswhite(AT)hotmail.com), Feb 21 2006
a(n) = 1/Det[Table[(i+j)!/i!/(j+1)!,{i,1,n},{j,1,n}]] for n>0. This is a matrix with Catalan numbers on diagonal. - Alexander Adamchuk, Jul 04 2006
Hankel transform of A074664 . - Philippe DELEHAM, Jun 21 2007
For n>=2, a(n-2)=(-1)^n*sum((j+1)*stirling1(n,j+1),j=0..n-1); [From Milan Janjic, Dec 14 2008]
Contribution from Paul Barry, Jan 15 2009: (Start)
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.
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)
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]
a(n) = A053657(n)/A163176(n) for n > 0. [Jonathan Sondow, Jul 26 2009]
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. [From Timothy Hopper (timothyhopper(AT)hotmail.co.uk), Aug 12 2009]
a(n)= a(n-1)^2/a(n-2) +a(n-1), n>=2. [Jaume Oliver Lafont, Sep 21 2009]
a(n)=Gamma(n+1) [From Barbarel Tres Mil (barbarel3000(AT)yahoo.es), Sep 21 2009]
a(n) = A_{n}(1) where A_{n}(x) are the Eulerian polynomials. [Peter Luschny, Aug 03 2010]
a(n)= n*(2*a(n-1) - (n-1)*a(n-2)), n>1. [Gary Detlefs, Sep 16 2010]
1/a(n) = -sum_{k=1..n+1} (-2)^k*(n+k+2)*a(k)/(a(2*k+1)*a(n+1-k)). [From Groux Roland, Dec 08 2010]
Contribution by Vladimir Shevelev, Feb 21 2011. (Start)
a(n) = prod{p prime, p <=n} p^(sum{i>=1} floor(n/p^i);
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)
The terms are the denominators of the expansion of sinh(x) + cosh(x). [Arkadiusz Wesolowski, Feb 03 2012]
G.f.: 1 / (1 - x / (1 - x / (1 - 2*x / (1 - 2*x / (1 - 3*x / (1 - 3*x / ... )))))). - Michael Somos, May 12 2012
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
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
From Sergei N. Gladkovskii, Dec 26 2012. (Start)
G.f.: A(x) = 1 + x/(G(0) - x) where G(k) = 1 + (k+1)*x - x*(k+2)/G(k+1); (continued fraction).
Let B(x) be the g.f. for A051296, then A(x) = 2 - 1/B(x).(End)
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
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
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
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]
|
|
|
EXAMPLE
|
There are 3! = 1*2*3 = 6 ways to arrange 3 letters {a,b,c}, namely abc, acb, bac, bca, cab, cba.
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
|
|
|
MAPLE
|
A000142 := n->n!; [ seq(n!, n=0..20) ];
spec := [ S, {S=Sequence(Z) }, labeled ]; [seq(combstruct[count](spec, size=n), n=0..20)];
(Maple program for computing cycle indices of symmetric groups)
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:
with(combstruct):ZL0:=[S, {S=Set(Cycle(Z, card>0))}, labeled]: seq(count(ZL0, size=n), n=0..20); - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Sep 26 2007
|
|
|
MATHEMATICA
|
a[n_] := n!; Table[a[n], {n, 0, 20}] (* Stefan Steinerberger, Mar 30 2006 *)
FoldList[#1 #2 &, 1, Range@ 20] (* Robert G. Wilson v, May 07 2011 *)
Range[20]! (* Harvey P. Dale, Nov 19 2011 *)
|
|
|
PROG
|
(AXIOM) [factorial(n) for n in 0..10]
(MAGMA) a:= func< n | Factorial(n) >; [ a(n) : n in [0..10]];
(PARI) {a(n) = if( n<0, 0, n!)}
(Haskell) a000142 n = product [1..n] -- Reinhard Zumkeller, Apr 21 2011
(Haskell) a000142_list = 1 : zipWith (*) [1..] a000142_list -- Reinhard Zumkeller, 02 November 2011
(Python)
for i in range(1, 1000):
....y=i
....for j in range(1, i):
.......y=y*(i-j)
.......print(y, "\n")
(Python)
import math
for i in range(1, 1000):
....math.factorial(i)
....print("")
# Ruskin Harding, Feb 22 2013
|
|
|
CROSSREFS
|
Cf. A047920, A048631, A003422, A000165, A001563, A001044, A010050, A009445, A038507, A033312, A034886, A012245.
Factorial base representation: A007623.
Cf. A144108, A052186, A144107, A003319 [From Gary W. Adamson, Sep 11 2008]
Complement of A063992. [From Reinhard Zumkeller, Oct 11 2008]
Cf. A053657, A163176. [From Jonathan Sondow, Jul 26 2009]
A173280 [From Gary W. Adamson, Feb 14 2010]
Sequence in context: A124355 A133942 A159333 A165233 A074166 A130641 A129655
Adjacent sequences: A000139 A000140 A000141 * A000143 A000144 A000145
|
|
|
KEYWORD
|
core,easy,nonn,nice
|
|
|
AUTHOR
|
N. J. A. Sloane.
|
|
|
STATUS
|
approved
|
| |
|
|