A080048
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 loop repetitions in reversal step.
Original entry on oeis.org
1, 7, 34, 182, 1107, 7773, 62212, 559948, 5599525, 61594835, 739138086, 9608795202, 134523132919, 2017846993897, 32285551902472, 548854382342168, 9879378882159177, 187708198761024543, 3754163975220491050
Offset: 2
- 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.
A162995
A scaled version of triangle A162990.
Original entry on oeis.org
1, 3, 1, 12, 4, 1, 60, 20, 5, 1, 360, 120, 30, 6, 1, 2520, 840, 210, 42, 7, 1, 20160, 6720, 1680, 336, 56, 8, 1, 181440, 60480, 15120, 3024, 504, 72, 9, 1, 1814400, 604800, 151200, 30240, 5040, 720, 90, 10, 1
Offset: 1
The first few rows of the triangle are:
[1]
[3, 1]
[12, 4, 1]
[60, 20, 5, 1]
A056542(n) equals the row sums for n>=1.
-
a162995 n k = a162995_tabl !! (n-1) !! (k-1)
a162995_row n = a162995_tabl !! (n-1)
a162995_tabl = map fst $ iterate f ([1], 3)
where f (row, i) = (map (* i) row ++ [1], i + 1)
-- Reinhard Zumkeller, Jul 04 2012
-
a := proc(n, m): (n+1)!/(m+1)! end: seq(seq(a(n, m), m=1..n), n=1..9); # Johannes W. Meijer, revised Nov 23 2012
-
Table[(n+1)!/(m+1)!, {n, 10}, {m, n}] (* Paolo Xausa, Mar 31 2024 *)
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.
Original entry on oeis.org
0, 2, 11, 63, 388, 2734, 21893, 197069, 1970726, 21678036, 260136487, 3381774403, 47344841720, 710172625898, 11362762014473, 193166954246169, 3477005176431178, 66063098352192544, 1321261967043851051, 27746501307920872271, 610423028774259190172, 14039729661807961374198
Offset: 2
- Donald E. Knuth: The Art of Computer Programming, Volume 4, Fascicle 2, Generating All Tuples and Permutations. Addison-Wesley (2005). Chapter 7.2.1.2, 39-40.
A056543
a(n) = n*a(n-1) - 1 with a(1)=1.
Original entry on oeis.org
1, 1, 2, 7, 34, 203, 1420, 11359, 102230, 1022299, 11245288, 134943455, 1754264914, 24559708795, 368395631924, 5894330110783, 100203611883310, 1803665013899579, 34269635264092000, 685392705281839999, 14393246810918639978, 316651429840210079515, 7282982886324831828844
Offset: 1
a(4) = 4*a(3) - 1 = 4*2 - 1 = 7.
-
nxt[{n_,a_}]:={n+1,a(n+1)-1}; NestList[nxt,{1,1},30][[All,2]] (* Harvey P. Dale, Dec 31 2022 *)
A329426
Number of non-isomorphic directed graphs where every vertex has outdegree 1, and no self-loops.
Original entry on oeis.org
1, 2, 6, 20, 97, 550, 3794, 29826, 266527, 2649156, 29040865, 347548542, 4509961264, 63050417976, 944767674590, 15103712944100, 256594870255076, 4616238126871328, 87670085904641440, 1752759735606185804, 36796608121601906104, 809312755145598475440, 18609995953274373396982
Offset: 2
For n = 2, a(2) = 1 + A329427(2) + A056542(1) = 1 + 0 + 0 = 1, which is the graph A <--> B.
For n = 3, a(3) = 1 + A329427(3) + A056542(2) = 1 + 0 + 1 = 2, which are graphs A --> B <--> C and A --> B --> C --> A.
The middle term is nonzero when there are graphs with more than 1 component.
A329427
Number of directed graphs of n vertices with more than 1 component and outdegree 1.
Original entry on oeis.org
1, 2, 10, 32, 173, 864, 5876, 42654, 369352, 3490396, 37205377, 431835570, 5488938513, 75253166882, 1111054042385, 17529435042906, 294620759901439, 5250432711385802, 98912760811106081, 1963457208200874954, 40962100714228585825, 895889161265034629994, 20497593840242211891900
Offset: 4
a(4) = A329426(2)*A329426(2) = 1*1 = 1, which represents the graph
V <--> V
V <--> V.
a(5) = A329426(2)*A329426(3) = 1*2 = 2, which represents the two possible graphs of size 3 (V --> V <--> V, etc.) paired with V <--> V.
a(6) = A329426(2)*A329426(4) + A329426(3)*A329426(3) = 1*6 + 2*2 = 10.
A134433
Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} in which the last entry of the first increasing run is equal to k (1 <= k <= n).
Original entry on oeis.org
1, 0, 2, 0, 1, 5, 0, 2, 6, 16, 0, 6, 16, 33, 65, 0, 24, 60, 114, 196, 326, 0, 120, 288, 522, 848, 1305, 1957, 0, 720, 1680, 2952, 4632, 6850, 9786, 13700, 0, 5040, 11520, 19800, 30336, 43710, 60672, 82201, 109601
Offset: 1
T(4,3)=6 because we have 3124, 3142, 3214, 3241, 1324 and 2314.
Triangle starts:
1;
0, 2;
0, 1, 5;
0, 2, 6, 16;
0, 6, 16, 33, 65;
0, 24, 60, 114, 196, 326;
-
T:=proc(n,k): if k < n then sum(factorial(k-1)*factorial(n-j-1)/(factorial(j-1)*factorial(k-j-1)), j=1..k-1) elif k = n then factorial(n-1)*(sum(1/factorial(j), j = 0 .. n-1)) else 0 end if end proc: for n to 9 do seq(T(n, k),k=1..n) end do; # yields sequence in triangular form
-
Table[If[k < n, Sum[(n - j - 1)!*(k - j)*Binomial[k - 1, j - 1], {j, k - 1}], (n - 1)!*Sum[1/j!, {j, 0, n - 1}]], {n, 9}, {k, n}] // Flatten (* Michael De Vlieger, Nov 15 2019 *)
Comments