cp's OEIS Frontend

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.

A080047 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 times l has to be repeatedly decreased in step L3.

This page as a plain text file.
%I A080047 #19 Nov 21 2013 12:47:58
%S A080047 0,1,7,41,256,1807,14477,130321,1303246,14335751,172029067,2236377937,
%T A080047 31309291196,469639368031,7514229888601,127741908106337,
%U A080047 2299354345914202,43687732572369991,873754651447399991
%N A080047 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 times l has to be repeatedly decreased in step L3.
%D A080047 D. E. Knuth: The Art of Computer Programming, Volume 4, Combinatorial Algorithms, Volume 4A, Enumeration and Backtracking. Pre-fascicle 2B, A draft of section 7.2.1.2: Generating all permutations. Available online; see link.
%H A080047 Vincenzo Librandi, <a href="/A080047/b080047.txt">Table of n, a(n) for n = 2..200</a>
%H A080047 D. E. Knuth, <a href="http://www-cs-faculty.stanford.edu/~knuth/fasc2b.ps.gz">TAOCP Vol. 4, Pre-fascicle 2b (generating all permutations)</a>.
%H A080047 Hugo Pfoertner, <a href="http://www.randomwalk.de/sequences/lpure.txt">FORTRAN implementation of Knuth's Algorithms L for lexicographic permutation generation</a>
%F A080047 a(2)=0, a(n) = n*a(n-1)+(n-1)*(n-2)/2 for n>=3 c = limit n--> infinity a(n)/n! = 0.35914091422952261768 = e/2-1, a(n) = floor [c*n! - (n-1)/2] for n>=2
%F A080047 E.g.f.: (2-exp(x)*(x^2-2*x+2))/(2*(x-1)). - _Vaclav Kotesovec_, Oct 21 2012
%t A080047 Transpose[NestList[{First[#]+1,(First[#]+1)Last[#]+(First[#](First[#]-1))/2}&, {2,0},20]][[2]] (* _Harvey P. Dale_, Feb 27 2012 *)
%t A080047 Rest[Rest[CoefficientList[Series[(2-Exp[x]*(x^2-2*x+2))/(2*(x-1)),{x,0,20}],x]*Range[0,20]!]] (* _Vaclav Kotesovec_, Oct 21 2012 *)
%o A080047 FORTRAN program available at Pfoertner link.
%Y A080047 Cf. A038155, A038156, A056542, A080048, A080049, A079754.
%K A080047 nonn
%O A080047 2,3
%A A080047 _Hugo Pfoertner_, Jan 25 2003