OFFSET
3,2
COMMENTS
The required number of index tests (test for termination and test in the final reversion loop) becomes 0.2613625*n! for large n, if the test for n=3 is excluded. If n=3 is included the additionally required termination test adds n!/6 index comparisons, increasing the number of index comparisons to 0.428029*n! (63.8% more index comparisons).
REFERENCES
For references and corresponding links see under A079884
LINKS
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
PROG
FORTRAN program available at link
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Jan 13 2003
STATUS
approved