Operation count to create all permutations of n distinct elements using Algorithm L (lexicographic permutation generation) from Knuth's The Art of Computer Programming, Vol. 4, chapter 7.2.1.2. Sequence gives number of interchange operations in step L4.

A080049

Operation count to create all permutations of n distinct elements using Algorithm L (lexicographic permutation generation) from Knuth's The Art of Computer Programming, Vol. 4, chapter 7.2.1.2. Sequence gives number of interchange operations in step L4.

Terms

    a(0) =0a(1) =2a(2) =11a(3) =63a(4) =388a(5) =2734a(6) =21893a(7) =197069a(8) =1970726a(9) =21678036a(10) =260136487a(11) =3381774403a(12) =47344841720a(13) =710172625898

External references