This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A079756 #26 Mar 25 2021 10:22:35 %S A079756 0,0,4,29,215,1734,15630,156327,1719637,20635688,268264004,3755696121, %T A079756 56335441899,901367070474,15323240198170,275818323567179, %U A079756 5240548147776545,104810962955531052,2201030222066152272 %N A079756 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 interchanges in reversal step. %C A079756 The asymptotic value for large n is 0.04308...*n! = (e+1/e-3)/2 * n! See also comment for A079884. %D A079756 See under A079884 %H A079756 Indranil Ghosh, <a href="/A079756/b079756.txt">Table of n, a(n) for n = 3..101</a> %H A079756 Hugo Pfoertner, <a href="http://www.randomwalk.de/sequences/lpgcount.txt">FORTRAN program for lexicographic permutation generation</a> %F A079756 a(3)=0, a(4)=0, a(n) = n*a(n-1) + (n-1)*(floor((n-1)/2)-1) for n>=5. %F A079756 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 %F A079756 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 %t A079756 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}] %o A079756 FORTRAN program available at link %o A079756 (Python) %o A079756 l=[0, 0, 0, 0, 0] %o A079756 for n in range(5, 22): %o A079756 l.append(n*l[n - 1] + (n - 1)*((n - 1)//2 - 1)) %o A079756 print(l[3:]) # _Indranil Ghosh_, Jul 18 2017 %Y A079756 Cf. A079884, A079750, A079751, A079752, A079753, A079754, A079755. %K A079756 nonn %O A079756 3,3 %A A079756 _Hugo Pfoertner_, Jan 16 2003 %E A079756 More terms from _Benoit Cloitre_ and _Robert G. Wilson v_, Jan 19 2003