A350015
Irregular triangle read by rows: T(n,k) is the number of n-permutations whose third-longest cycle has length exactly k; n >= 0, 0 <= k <= floor(n/3).
Original entry on oeis.org
1, 1, 2, 5, 1, 17, 7, 74, 46, 394, 311, 15, 2484, 2241, 315, 18108, 17627, 4585, 149904, 152839, 57897, 2240, 1389456, 1460944, 705600, 72800, 14257440, 15326180, 8673060, 1660120, 160460640, 175421214, 110271546, 31600800, 1247400, 1965444480, 2177730270, 1469308698, 559402272, 55135080
Offset: 0
Triangle begins:
[0] 1;
[1] 1;
[2] 2;
[3] 5, 1;
[4] 17, 7;
[5] 74, 46;
[6] 394, 311, 15;
[7] 2484, 2241, 315;
[8] 18108, 17627, 4585;
[9] 149904, 152839, 57897, 2240;
...
Column 0 gives 1 together with
A000774.
-
b:= proc(n, l) option remember; `if`(n=0, x^l[1], add((j-1)!*
b(n-j, sort([l[], j])[2..4])*binomial(n-1, j-1), j=1..n))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$3])):
seq(lprint(T(n)), n=0..14); # Alois P. Heinz, Dec 11 2021
-
b[n_, l_] := b[n, l] = If[n == 0, x^l[[1]], Sum[(j - 1)!*b[n - j, Sort[Append[l, j]][[2 ;; 4]]]*Binomial[n - 1, j - 1], {j, 1, n}]];
T[n_] := With[{p = b[n, {0, 0, 0}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]];
Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)
A350016
Irregular triangle read by rows: T(n,k) is the number of n-permutations whose third-shortest cycle has length exactly k; n >= 0, 0 <= k <= max(0,n-2).
Original entry on oeis.org
1, 1, 2, 5, 1, 17, 1, 6, 74, 11, 15, 20, 394, 56, 60, 120, 90, 2484, 407, 525, 490, 630, 504, 18108, 3235, 4725, 2240, 4620, 4032, 3360, 149904, 29143, 40509, 27440, 26460, 33264, 30240, 25920, 1389456, 291394, 398790, 319760, 163800, 302400, 277200, 259200, 226800
Offset: 0
Triangle begins:
[0] 1;
[1] 1;
[2] 2;
[3] 5, 1;
[4] 17, 1, 6;
[5] 74, 11, 15, 20;
[6] 394, 56, 60, 120, 90;
[7] 2484, 407, 525, 490, 630, 504;
[8] 18108, 3235, 4725, 2240, 4620, 4032, 3360;
[9] 149904, 29143, 40509, 27440, 26460, 33264, 30240, 25920;
...
Column 0 gives 1 together with
A000774.
Column 1 gives the column 3 of
A208956.
-
m:= infinity:
b:= proc(n, l) option remember; `if`(n=0, x^`if`(l[3]=m,
0, l[3]), add(b(n-j, sort([l[], j])[1..3])
*binomial(n-1, j-1)*(j-1)!, j=1..n))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [m$3])):
seq(T(n), n=0..10); # Alois P. Heinz, Dec 11 2021
-
m = Infinity;
b[n_, l_] := b[n, l] = If[n == 0, x^If[l[[3]] == m, 0, l[[3]]], Sum[b[n-j, Sort[Append[l, j]][[1;;3]]]*Binomial[n - 1, j - 1]*(j - 1)!, {j, 1, n}]];
T[n_] := With[{p = b[n, {m, m, m}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]];
Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)
A350273
Irregular triangle read by rows: T(n,k) is the number of n-permutations whose fourth-longest cycle has length exactly k; n >= 0, 0 <= k <= floor(n/4).
Original entry on oeis.org
1, 1, 2, 6, 23, 1, 109, 11, 619, 101, 4108, 932, 31240, 8975, 105, 268028, 91387, 3465, 2562156, 991674, 74970, 27011016, 11514394, 1391390, 311378616, 143188574, 24188010, 246400, 3897004032, 1905067958, 412136010, 12812800, 52626496896, 27059601596, 7053834788, 438357920
Offset: 0
Triangle begins:
[0] 1;
[1] 1;
[2] 2;
[3] 6;
[4] 23, 1;
[5] 109, 11;
[6] 619, 101;
[7] 4108, 932;
[8] 31240, 8975, 105;
[9] 268028, 91387, 3465;
...
-
b:= proc(n, l) option remember; `if`(n=0, x^l[1], add((j-1)!*
b(n-j, sort([l[], j])[2..5])*binomial(n-1, j-1), j=1..n))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$4])):
seq(T(n), n=0..14); # Alois P. Heinz, Dec 22 2021
-
b[n_, l_] := b[n, l] = If[n == 0, x^l[[1]], Sum[(j - 1)!*b[n - j, Sort[ Append[l, j]][[2 ;; 5]]]*Binomial[n - 1, j - 1], {j, 1, n}]];
T[n_] := With[{p = b[n, {0, 0, 0, 0}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]];
Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Dec 29 2021, after Alois P. Heinz *)
A350274
Triangle read by rows: T(n,k) is the number of n-permutations whose fourth-shortest cycle has length exactly k; n >= 0, 0 <= k <= max(0,n-3).
Original entry on oeis.org
1, 1, 2, 6, 23, 1, 109, 1, 10, 619, 16, 45, 40, 4108, 92, 210, 420, 210, 31240, 771, 1645, 2800, 2520, 1344, 268028, 6883, 17325, 15960, 26460, 18144, 10080, 2562156, 68914, 173250, 148400, 226800, 211680, 151200, 86400, 27011016, 757934, 1854930, 1798720, 1801800, 2494800, 1940400, 1425600, 831600
Offset: 0
Triangle begins:
[0] 1;
[1] 1;
[2] 2;
[3] 6;
[4] 23, 1;
[5] 109, 1, 10;
[6] 619, 16, 45, 40;
[7] 4108, 92, 210, 420, 210;
[8] 31240, 771, 1645, 2800, 2520, 1344;
[9] 268028, 6883, 17325, 15960, 26460, 18144, 10080;
...
Column 0 is 1 for n=0, together with
A000142(n) -
A122105(n-1) for n>=1.
-
m:= infinity:
b:= proc(n, l) option remember; `if`(n=0, x^`if`(l[4]=m,
0, l[4]), add(b(n-j, sort([l[], j])[1..4])
*binomial(n-1, j-1)*(j-1)!, j=1..n))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [m$4])):
seq(T(n), n=0..11); # Alois P. Heinz, Dec 22 2021
-
m = Infinity;
b[n_, l_] := b[n, l] = If[n == 0, x^If[l[[4]] == m, 0, l[[4]]], Sum[b[n-j, Sort[Append[l, j]][[1 ;; 4]]]*Binomial[n-1, j-1]*(j-1)!, {j, 1, n}]];
T[n_] := With[{p = b[n, {m, m, m, m}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]];
Table[T[n], {n, 0, 11}] // Flatten (* Jean-François Alcover, Dec 29 2021, after Alois P. Heinz *)
A052145
a(n) = (2n-1)*(2n-1)!/n.
Original entry on oeis.org
1, 9, 200, 8820, 653184, 73180800, 11564467200, 2451889440000, 671854030848000, 231125690776780800, 97537253236899840000, 49549698749529538560000, 29829250083328819200000000, 20999962511521107738624000000, 17094073187896757112117657600000
Offset: 1
For n=2, there are 9 permutations of [4] = { 1, 2, 3, 4 } which have a cycle of length 2: each of the 4*3/2 = 6 transpositions, plus the 3 different possible products of two transpositions. - _M. F. Hasler_, Apr 21 2015
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 7.68(d).
A364967
Number T(n,k) of permutations of [n] for which the difference between the longest and the shortest cycle length is k; triangle T(n,k), n>=0, 0<=k<=max(0,n-2), read by rows.
Original entry on oeis.org
1, 1, 2, 3, 3, 10, 6, 8, 25, 45, 20, 30, 176, 60, 250, 90, 144, 721, 861, 770, 1344, 504, 840, 6406, 1778, 7980, 6300, 8736, 3360, 5760, 42561, 23283, 38808, 75348, 45360, 66240, 25920, 45360, 436402, 84150, 363680, 456120, 708048, 378000, 572400, 226800, 403200
Offset: 0
T(4,0) = 10: (1)(2)(3)(4), (12)(34), (13)(24), (14)(23), (1234), (1243), (1324), (1342), (1423), (1432).
T(4,1) = 6: (1)(2)(34), (1)(23)(4), (1)(24)(3), (12)(3)(4), (13)(2)(4), (14)(2)(3).
T(4,2) = 8: (1)(234), (1)(243), (123)(4), (132)(4), (124)(3), (142)(3), (134)(2), (143)(2).
Triangle T(n,k) begins:
1;
1;
2;
3, 3;
10, 6, 8;
25, 45, 20, 30;
176, 60, 250, 90, 144;
721, 861, 770, 1344, 504, 840;
6406, 1778, 7980, 6300, 8736, 3360, 5760;
42561, 23283, 38808, 75348, 45360, 66240, 25920, 45360;
...
Column k=0 gives
A005225 (for n>=1).
T(n+1,n-1) gives
A001048(n) (for n>=1).
-
b:= proc(n, l, m) option remember; `if`(n=0, x^(m-l), add(
b(n-j, min(l, j), max(m, j))*binomial(n-1, j-1)*(j-1)!, j=1..n))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2, 0)):
seq(T(n), n=0..12);
-
b[n_, l_, m_] := b[n, l, m] = If[n == 0, x^(m - l), Sum[b[n - j, Min[l, j], Max[m, j]]*Binomial[n - 1, j - 1]*(j - 1)!, {j, 1, n}]];
T[n_] := CoefficientList[b[n, n, 0], x];
Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 08 2023, after Alois P. Heinz *)
A271708
Triangle read by rows, T(n,k) = Sum_{p in P(n,k)} Aut(p) where P(n,k) are the partitions of n with largest part k and Aut(p) = 1^j[1]*j[1]!*...*n^j[n]*j[n]! where j[m] is the number of parts in the partition p equal to m; for n>=0 and 0<=k<=n.
Original entry on oeis.org
1, 0, 1, 0, 2, 2, 0, 6, 2, 3, 0, 24, 12, 3, 4, 0, 120, 20, 12, 4, 5, 0, 720, 112, 42, 16, 5, 6, 0, 5040, 336, 126, 44, 20, 6, 7, 0, 40320, 2112, 492, 188, 55, 24, 7, 8, 0, 362880, 11712, 2802, 640, 215, 66, 28, 8, 9, 0, 3628800, 92160, 16938, 3624, 830, 258, 77, 32, 9, 10
Offset: 0
Triangle starts:
[1]
[0, 1]
[0, 2, 2]
[0, 6, 2, 3]
[0, 24, 12, 3, 4]
[0, 120, 20, 12, 4, 5]
[0, 720, 112, 42, 16, 5, 6]
[0, 5040, 336, 126, 44, 20, 6, 7]
[0, 40320, 2112, 492, 188, 55, 24, 7, 8]
-
def A271708(n,k):
P = Partitions(n, max_part=k, inner=[k])
return sum([p.aut() for p in P])
for n in (0..9): print([A271708(n,k) for k in (0..n)])
A339016
A classification of permutations based on their cycle length and the size of the centralizer of their cycle type. Triangle read by rows, T(n, k) for 0 <= k <= n.
Original entry on oeis.org
1, 0, 1, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 3, 21, 0, 0, 0, 0, 35, 85, 0, 0, 0, 0, 55, 255, 410, 0, 0, 0, 0, 0, 1015, 1659, 2366, 0, 0, 0, 0, 0, 2485, 10528, 11242, 16065, 0, 0, 0, 0, 0, 2240, 58149, 92064, 84762, 125665, 0, 0, 0, 0, 0, 0, 228221, 760725, 805530, 722250, 1112074
Offset: 0
Triangle starts:
0: [1]
1: [0, 1]
2: [0, 0, 2]
3: [0, 0, 0, 6]
4: [0, 0, 0, 3, 21]
5: [0, 0, 0, 0, 35, 85]
6: [0, 0, 0, 0, 55, 255, 410]
7: [0, 0, 0, 0, 0, 1015, 1659, 2366]
8: [0, 0, 0, 0, 0, 2485, 10528, 11242, 16065]
9: [0, 0, 0, 0, 0, 2240, 58149, 92064, 84762, 125665]
----------------------------------------------------------
Sum 1, 1, 2, 9, 111, 6080, 2331767, ...
.
Examples for the basic two-dimensional classification of permutations (dots indicate zeros):
.
* Case n = 6:
| 1 2 3 4 5 6 | Sum
-------------------------------------|----
1 | . . . . . [1] | 1
2 | . . [ 15] [45] [15] | 75
3 | . [ 40] [120] [40] | 200
4 | . [ 90] [ 90] | 180
5 | . [144] | 144
6 | [120] | 120
-------------------------------------|----
Sum| 120, 274, 225, 85, 15, 1 | 720
.
Antidiagonals: [40 + 15, 90 + 120 + 45, 120 + 144 + 90 + 40 + 15 + 1]
Leads to row 6 (disregarding leading zeros): 55 + 255 + 410 = 720.
.
* Case n = 7:
| 1 2 3 4 5 6 7 | Sum
--------------------------------------------|-----
1 | . . . . . . [1] | 1
2 | . . . [105] [105] [21] | 231
3 | . . [490] [420] [ 70] | 980
4 | . [420] [630] [210] | 1260
5 | . [504] [504] | 1008
6 | . [840] | 840
7 | [720] | 720
--------------------------------------------|-----
Sum| 720, 1764, 1624, 735, 175, 21, 1 | 5040
.
Antidiagonals: [420+490+105, 504+630+420+105, 720+840+504+210+70+21+1]
Leads to row 7 (disregarding leading zeros): 1015 + 1659 + 2366 = 5040
.
* Column sums of the matrix give the unsigned Stirling cycle numbers, A132393.
* Row sums of the matrix give the number of permutations of n elements whose longest cycle have length k, A126074.
* The main antidiagonal of the matrix gives the number of n-permutations that are pure cycles of length n - k, A092271.
* The entries of the matrix sum to n!. In particular the sum over all row sums, the sum over all column sums, and the sum over all antidiagonal sums is n!.
* The columns of the triangle are finite in the sense that their entries become ultimately zero. Column sums of the triangle are A339015.
-
# For illustration computes also A132393 and A126074 (remove the #).
def A339016Row(n):
f = factorial(n); M = matrix(n + 2)
for k in (0..n):
for p in Partitions(n, max_part=k, inner=[k]):
M[k, len(p)] += (f // p.aut())
# print("max cyc len", [sum(M[k, j] for j in (0..n+1)) for k in (0..n)])
# print("Stirling 1 ", [sum(M[j, k] for j in (0..n+1)) for k in (0..n)])
if n == 0: return [1]
return [sum(M[j, k-j+1] for j in srange(k, 0, -1)) for k in (0..n)]
for n in (0..9): print(A339016Row(n))
A364317
Irregular triangle T read by rows: T(n, k) gives the number of permutations of [n] = {1, 2, ..., n} with a cycle of length m = floor(n/2) + k = A138099(n, k), for 1 <= k <= n - floor(n/2) = ceiling(n/2).
Original entry on oeis.org
1, 1, 3, 2, 8, 6, 40, 30, 24, 180, 144, 120, 1260, 1008, 840, 720, 8064, 6720, 5760, 5040, 72576, 60480, 51840, 45360, 40320, 604800, 518400, 453600, 403200, 362880, 6652800, 5702400, 4989600, 4435200, 3991680, 3628800
Offset: 1
The irregular triangle begins:
n\k 1 2 3 4 5 6 ...
-------------------------------------------------------
1: 1
2: 1
3: 3 2
4: 8 6
5: 40 30 24
6: 180 144 120
7: 1260 1008 840 720
8: 8064 6720 5760 5040
9: 72576 60480 51840 45360 40320
10: 604800 518400 453600 403200 362880
11: 6652800 5702400 4989600 4435200 3991680 3628800
...
T(5, 1) = 40 because m(5, 1) = 2 + 1 = 3, and for each of the binomial(5, 3) = 10 possibilities for choosing three numbers from [5] there are (3 - 1)! = 2 3-cycles if each starts with the smallest number, e.g., for {2, 3, 5} the cycles are (2, 3, 5) and (2, 5, 3). For the remaining 5-3 = 2 numbers there are 2! possible permutations; in the example permutations of {1, 4}, namely (1)(4) and (1,4). Thus T(5, 3) = binomial(5, 3)*2!*2! = 10*2*2 = 40 = 5!/3.
- Paolo Xausa, Table of n, a(n) for n = 1..1024 (rows 1..63 of the triangle, flattened)
- Eugene Curtis and Max Warshauer, The Locker Puzzle, The Mathematical Intelligencer 28 (2006), pp. 28-31.
- Christoph Pöppe, Freiheit für die Kombinatoriker, Spektrum, Highlights 1.21, pp. 16-18 (in German).
- Wikipedia, 100 prisoners problem.
- Wikipedia (in German), Problem der 100 Gefangenen.
A071007
Number of permutations in the symmetric group S_n such that the maximal cycle has length exactly 3.
Original entry on oeis.org
0, 0, 0, 2, 8, 40, 200, 980, 5152, 28448, 162080, 979000, 6179360, 40575392, 279199648, 1997406320, 14825619200, 114365751040, 912510870272, 7521873125408, 64045101880960, 561615674345600, 5067769601121920, 47023128008540992, 447820056115824128
Offset: 0
Sharon Sela (sharonsela(AT)hotmail.com), May 19 2002
-
nn=20;Range[0,nn]!CoefficientList[Series[Exp[x+x^2/2+x^3/3]-Exp[x+x^2/2],{x,0,nn}],x] (* Geoffrey Critzer, Jan 23 2013 *)
-
for(n=0,25,print1(polcoeff(serlaplace(exp(x+x^2/2+x^3/3)-exp(x+x^2/2)),n)","))
Comments