A079885 Number of index tests required to create all permutations of n distinct elements using the "streamlined" version of Algorithm L (lexicographic permutation generation) from Knuth's The Art of Computer Programming, Vol. 4, chapter 7.2.1.2.
0, 4, 29, 185, 1314, 10534, 94839, 948427, 10432748, 125193032, 1627509489, 22785132925
Offset: 3
Keywords
References
- For references and corresponding links see under A079884
Links
- Hugo Pfoertner, FORTRAN program for lexicographic permutation generation.
Crossrefs
Programs
-
Fortran
! program available at link
Formula
For n>=3 a(n)=floor(c*n!-(n-3)/2) where c=limit n-->infinity a(n)/n!= 0.261362463274289013838... - Benoit Cloitre, Jan 20 2003
In closed form, c = 3*exp(1)/2 + exp(-1)/2 - 4. - Vaclav Kotesovec, Mar 18 2014
Comments