The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A079751 Operation count 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. Sequence gives number of cases where the j search loop runs beyond j=n-3. 8
0, 1, 6, 37, 260, 2081, 18730, 187301, 2060312, 24723745, 321408686, 4499721605, 67495824076, 1079933185217, 18358864148690, 330459554676421, 6278731538852000, 125574630777040001, 2637067246317840022, 58015479418992480485, 1334356026636827051156 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,3
COMMENTS
The asymptotic value for large n is 0.051615...*n! = (e - 8/3)*n!. See also comment for A079884.
REFERENCES
See under A079884.
LINKS
FORMULA
a(3)=0, a(n) = n * a(n-1) + 1 for n >= 4.
For n >= 3, a(n) = floor(c*n!) where c = lim_{n->infinity} a(n)/n! = 0.05161516179237856869. - Benoit Cloitre
a(n) = Sum_{j=4..n} (n-j)! * binomial(n,j). - Zerinvary Lajos, Jul 31 2006
E.g.f.: (exp(x) - Sum_{k=0..3} x^k/k!) / (1 - x). - Ilya Gutkovskiy, Jun 26 2022
MAPLE
a:=n->sum((n-j)!*binomial(n, j), j=4..n): seq(a(n), n=3..25); # Zerinvary Lajos, Jul 31 2006
MATHEMATICA
a[3] = 0; a[n_] := n*a[n - 1] + 1; Table[a[n], {n, 3, 21}]
PROG
FORTRAN program available at link
CROSSREFS
Sequence in context: A192238 A140712 A362094 * A088312 A012364 A012719
KEYWORD
easy,nonn
AUTHOR
Hugo Pfoertner, Jan 14 2003
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jan 22 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 20:33 EDT 2024. Contains 372522 sequences. (Running on oeis4.)