OFFSET
3,3
COMMENTS
The asymptotic value for large n is 0.04308...*n! = (e+1/e-3)/2 * n! See also comment for A079884.
REFERENCES
See under A079884
LINKS
Indranil Ghosh, Table of n, a(n) for n = 3..101
Hugo Pfoertner, FORTRAN program for lexicographic permutation generation
FORMULA
a(3)=0, a(4)=0, a(n) = n*a(n-1) + (n-1)*(floor((n-1)/2)-1) for n>=5.
For n>=3, a(n) = floor(c*n!-(n-3)/2) where c = lim_{n->infinity} a(n)/n! = 0.04308063481524377... - Benoit Cloitre, Jan 19 2003
Recurrence: (n-5)*(n-3)*(n-2)*a(n) = (n-3)*(n^3 - 7*n^2 + 11*n - 1)*a(n-1) - (n-1)*(2*n - 5)*a(n-2) - (n-4)*(n-2)^2*(n-1)*a(n-3). - Vaclav Kotesovec, Mar 16 2014
MATHEMATICA
a[3] = 0; a[4] = 0; a[n_] := n*a[n - 1] + (n - 1)*(Floor[(n - 1)/2] - 1); Table[a[n ], {n, 3, 21}]
PROG
FORTRAN program available at link
(Python)
l=[0, 0, 0, 0, 0]
for n in range(5, 22):
l.append(n*l[n - 1] + (n - 1)*((n - 1)//2 - 1))
print(l[3:]) # Indranil Ghosh, Jul 18 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Jan 16 2003
EXTENSIONS
More terms from Benoit Cloitre and Robert G. Wilson v, Jan 19 2003
STATUS
approved