OFFSET
2,2
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
FORMULA
a(2)=1, a(n)=n*a(n-1) + (n-1)*floor[(n+1)/2] for n>=3. c = limit n --> infinity a(n)/n! = 1.54308063481524377826 = (e+1/e)/2 a(n) = floor [c*n!-(n+1)/2] for n>=2.
PROG
FORTRAN program available at link.
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Jan 24 2003
STATUS
approved