|
Search: id:A038156
|
|
|
| A038156 |
|
n!*Sum(1/k!, k=1..n-1). |
|
+0 13
|
|
| 0, 0, 2, 9, 40, 205, 1236, 8659, 69280, 623529, 6235300, 68588311, 823059744, 10699776685, 149796873604, 2246953104075, 35951249665216, 611171244308689, 11001082397556420, 209020565553571999, 4180411311071440000, 87788637532500240021
(list; graph; listen)
|
|
|
OFFSET
|
0,3
|
|
|
COMMENT
|
Also number of operations needed 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 j in step L2 (see answer to exercise 5).
Related to number of operations of addition and multiplication to evaluate a determinant of order n by cofactor expansion - see A026243.
|
|
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.
|
|
LINKS
|
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 836
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.
Index entries for sequences related to factorial numbers
|
|
FORMULA
|
a(n)=floor[(e-1)*n! ]-1
a(0)=0, a(1)=0, a(n)=n*(a(n-1)+1) for n>1. [From Philippe DELEHAM (kolotoko(AT)wanadoo.fr), Oct 16 2009]
|
|
EXAMPLE
|
a(2)=floor[(2.718..-1)*2]-1=3-1=2, a(3)=floor[(2.718..-1)*6]-1=10-1=9
|
|
MATHEMATICA
|
a=1; Table[a=(a-1)*(n+1); Abs[a], {n, 0, 60}] [From Vladimir Orlovsky (4vladimir(AT)gmail.com), Nov 20 2009]
|
|
CROSSREFS
|
Cf. A038155, A056542, A079884, A079750.
Sequence in context: A038112 A052512 A166554 this_sequence A052846 A056844 A002825
Adjacent sequences: A038153 A038154 A038155 this_sequence A038157 A038158 A038159
|
|
KEYWORD
|
nonn,new
|
|
AUTHOR
|
N. J. A. Sloane (njas(AT)research.att.com).
|
|
EXTENSIONS
|
Additional comments from Hugo Pfoertner (hugo(AT)pfoertner.org), Jan 24 2003
|
|
|
Search completed in 0.002 seconds
|