|
Search: id:A038155
|
|
|
| A038155 |
|
(n!/2)*Sum(1/k!, k=0..n-2). |
|
+0 8
|
|
| 0, 0, 1, 6, 30, 160, 975, 6846, 54796, 493200, 4932045, 54252550, 651030666, 8463398736, 118487582395, 1777313736030, 28437019776600, 483429336202336, 8701728051642201, 165332832981201990, 3306656659624039990, 69439789852104840000
(list; graph; listen)
|
|
|
OFFSET
|
0,4
|
|
|
COMMENT
|
For n>=2 also operation count to create all permutations of n distinct elements using Algorithm L (lexicographic permutation generation) from Knuth's The Art of Computer Programming, Vol. 4, chapter 7.2.1.2. Sequence gives number of comparisons required to find the first interchangeable element in step L3. (see answer to exercise 5). - Hugo Pfoertner (hugo(AT)pfoertner.org), Jan 27 2003
|
|
REFERENCES
|
D. E. Knuth: The Art of Computer Programming, Volume 4, Combinatorial Algorithms, Volume 4A, Enumeration and Backtracking. Pre-fascicle 2B, A draft of section 7.2.1.2: Generating all permutations. Available online; see link.
|
|
LINKS
|
D. E. Knuth, TAOCP Vol. 4, Pre-fascicle 2b (generating all permutations).
Hugo Pfoertner, FORTRAN implementation of Knuth's Algorithm L for lexicographic permutation generation.
|
|
FORMULA
|
a(n) = 1/2*floor(n!*exp(1)-n-1), n>0. - Vladeta Jovovic (vladeta(AT)eunet.rs), Aug 18 2002
E.g.f.: x^2/2*exp(x)/(1-x). - Vladeta Jovovic (vladeta(AT)eunet.rs), Aug 25 2002
|
|
CROSSREFS
|
Cf. A038156, A056542, A080047, A080048, A080049, A079884, A079752.
Sequence in context: A152223 A152224 A026112 this_sequence A026331 A135490 A110706
Adjacent sequences: A038152 A038153 A038154 this_sequence A038156 A038157 A038158
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
N. J. A. Sloane (njas(AT)research.att.com).
|
|
|
Search completed in 0.002 seconds
|