A126074
Triangle read by rows: T(n,k) is the number of permutations of n elements that have the longest cycle length k.
Original entry on oeis.org
1, 1, 1, 1, 3, 2, 1, 9, 8, 6, 1, 25, 40, 30, 24, 1, 75, 200, 180, 144, 120, 1, 231, 980, 1260, 1008, 840, 720, 1, 763, 5152, 8820, 8064, 6720, 5760, 5040, 1, 2619, 28448, 61236, 72576, 60480, 51840, 45360, 40320, 1, 9495, 162080, 461160, 653184, 604800, 518400, 453600, 403200, 362880
Offset: 1
Triangle T(n,k) begins:
1;
1, 1;
1, 3, 2;
1, 9, 8, 6;
1, 25, 40, 30, 24;
1, 75, 200, 180, 144, 120;
1, 231, 980, 1260, 1008, 840, 720;
1, 763, 5152, 8820, 8064, 6720, 5760, 5040;
...
- Alois P. Heinz, Rows n = 1..141, flattened
- Steven Finch, Permute, Graph, Map, Derange, arXiv:2111.05720 [math.CO], 2021.
- S. W. Golomb and P. Gaal, On the number of permutations of n objects with greatest cycle length k, Adv. in Appl. Math., 20(1), 1998, 98-107.
- IBM Research, Ponder This, December 2006.
- Peter Luschny, Counting with Partitions. [From _Peter Luschny_, Mar 07 2009]
- Peter Luschny, Generalized Stirling_1 Triangles. [From _Peter Luschny_, Mar 07 2009]
- D. Panario and B. Richmond, Exact largest and smallest size of components, Algorithmica, 31 (2001), 413-432.
Cf.
A157386,
A157385,
A157384,
A157383,
A157400,
A157391,
A157392,
A157393,
A157394,
A157395. -
Peter Luschny, Mar 07 2009
-
A:= proc(n,k) option remember; `if`(n<0, 0, `if`(n=0, 1,
add(mul(n-i, i=1..j-1)*A(n-j,k), j=1..k)))
end:
T:= (n, k)-> A(n, k) -A(n, k-1):
seq(seq(T(n,k), k=1..n), n=1..10); # Alois P. Heinz, Feb 11 2013
-
Table[CoefficientList[ Series[(Exp[x^m/m] - 1) Exp[Sum[x^k/k, {k, 1, m - 1}]], {x, 0, 8}], x]*Table[n!, {n, 0, 8}], {m, 1, 8}] // Transpose // Grid (* Geoffrey Critzer, May 23 2009 *)
-
def A126074(n, k):
f = factorial(n)
P = Partitions(n, max_part=k, inner=[k])
return sum(f // p.aut() for p in P)
for n in (1..9): print([A126074(n,k) for k in (1..n)]) # Peter Luschny, Apr 17 2016
A322384
Number T(n,k) of entries in the k-th cycles of all permutations of [n] when cycles are ordered by decreasing lengths (and increasing smallest elements); triangle T(n,k), n>=1, 1<=k<=n, read by rows.
Original entry on oeis.org
1, 3, 1, 13, 4, 1, 67, 21, 7, 1, 411, 131, 46, 11, 1, 2911, 950, 341, 101, 16, 1, 23563, 7694, 2871, 932, 197, 22, 1, 213543, 70343, 26797, 9185, 2311, 351, 29, 1, 2149927, 709015, 275353, 98317, 27568, 5119, 583, 37, 1, 23759791, 7867174, 3090544, 1141614, 343909, 73639, 10366, 916, 46, 1
Offset: 1
The 6 permutations of {1,2,3} are:
(1) (2) (3)
(1,2) (3)
(1,3) (2)
(2,3) (1)
(1,2,3)
(1,3,2)
so there are 13 elements in the first cycles, 4 in the second cycles and only 1 in the third cycles.
Triangle T(n,k) begins:
1;
3, 1;
13, 4, 1;
67, 21, 7, 1;
411, 131, 46, 11, 1;
2911, 950, 341, 101, 16, 1;
23563, 7694, 2871, 932, 197, 22, 1;
213543, 70343, 26797, 9185, 2311, 351, 29, 1;
...
-
b:= proc(n, l) option remember; `if`(n=0, add(l[-i]*
x^i, i=1..nops(l)), add(binomial(n-1, j-1)*
b(n-j, sort([l[], j]))*(j-1)!, j=1..n))
end:
T:= n-> (p-> (seq(coeff(p, x, i), i=1..n)))(b(n, [])):
seq(T(n), n=1..12);
-
b[n_, l_] := b[n, l] = If[n == 0, Sum[l[[-i]]*x^i, {i, 1, Length[l]}], Sum[Binomial[n-1, j-1]*b[n-j, Sort[Append[l, j]]]*(j-1)!, {j, 1, n}]];
T[n_] := CoefficientList[b[n, {}], x] // Rest;
Array[T, 12] // Flatten (* Jean-François Alcover, Feb 26 2020, after Alois P. Heinz *)
A060014
Sum of orders of all permutations of n letters.
Original entry on oeis.org
1, 1, 3, 13, 67, 471, 3271, 31333, 299223, 3291487, 39020911, 543960561, 7466726983, 118551513523, 1917378505407, 32405299019941, 608246253790591, 12219834139189263, 253767339725277823, 5591088918313739017, 126036990829657056711, 2956563745611392385211
Offset: 0
For n = 4 there is 1 permutation of order 1, 9 permutations of order 2, 8 of order 3 and 6 of order 4, for a total of 67.
- D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section XIII.2, p. 460.
- Alois P. Heinz, Table of n, a(n) for n = 0..170
- FindStat - Combinatorial Statistic Finder, The order of a permutation
- Joshua Harrington, Lenny Jones, and Alicia Lamarche, Characterizing Finite Groups Using the Sum of the Orders of the Elements, International Journal of Combinatorics, Volume 2014, Article ID 835125, 8 pages.
-
b:= proc(n, g) option remember; `if`(n=0, g, add((j-1)!
*b(n-j, ilcm(g, j))*binomial(n-1, j-1), j=1..n))
end:
a:= n-> b(n, 1):
seq(a(n), n=0..30); # Alois P. Heinz, Jul 11 2017
-
CoefficientList[Series[Sum[n Fold[#1+MoebiusMu[n/#2] Apply[Times, Exp[x^#/#]&/@Divisors[#2] ]&,0,Divisors[n]],{n,Max[Apply[LCM,Partitions[19],1]]}],{x,0,19}],x] Range[0,19]! (* Wouter Meeussen, Jun 16 2012 *)
a[ n_] := If[ n < 1, Boole[n == 0], 1 + Total @ Apply[LCM, Map[Length, First /@ PermutationCycles /@ Drop[Permutations @ Range @ n, 1], {2}], 1]]; (* Michael Somos, Aug 19 2018 *)
-
\\ Naive method -- sum over cycles directly
cycleDecomposition(v:vec)={
my(cyc=List(), flag=#v+1, n);
while((n=vecmin(v))<#v,
my(cur=List(), i, tmp);
while(v[i++]!=n,);
while(v[i] != flag,
listput(cur, tmp=v[i]);
v[i]=flag;
i=tmp
);
if(#cur>1, listput(cyc, Vec(cur))) \\ Omit length-1 cycles
);
Vec(cyc)
};
permutationOrder(v:vec)={
lcm(apply(length, cycleDecomposition(v)))
};
a(n)=sum(i=0,n!-1,permutationOrder(numtoperm(n,i)))
\\ Charles R Greathouse IV, Nov 06 2014
-
A060014(n) =
{
my(factn = n!, part, nb, i, j, res = 0);
forpart(part = n,
nb = 1; j = 1;
for(i = 1, #part,
if (i == #part || part[i + 1] != part[i],
nb *= (i + 1 - j)! * part[i]^(i + 1 - j);
j = i + 1));
res += (factn / nb) * lcm(Vec(part)));
res;
} \\ Jerome Raulin, Jul 11 2017 (much faster, O(A000041(n)) vs O(n!))
A028417
Sum over all n! permutations of n elements of minimum lengths of cycles.
Original entry on oeis.org
1, 3, 10, 45, 236, 1505, 10914, 90601, 837304, 8610129, 96625970, 1184891081, 15665288484, 223149696601, 3394965018886, 55123430466945, 948479737691504, 17289345305870561, 332019600921360594, 6713316975465246889, 142321908843254560540, 3161718732648662557161
Offset: 1
Joe Keane (jgk(AT)jgk.org)
-
b:= proc(n, m) option remember; `if`(n=0, m, add((j-1)!*
b(n-j, min(m,j))*binomial(n-1, j-1), j=1..n))
end:
a:= n-> b(n, infinity):
seq(a(n), n=1..25); # Alois P. Heinz, May 14 2016
-
Drop[Apply[Plus,Table[nn=25;Range[0,nn]!CoefficientList[Series[Exp[Sum[ x^i/i,{i,n,nn}]]-1,{x,0,nn}],x],{n,1,nn}]],1] (* Geoffrey Critzer, Jan 10 2013 *)
b[n_, m_] := b[n, m] = If[n == 0, m, Sum[(j-1)! b[n-j, Min[m, j]]* Binomial[n-1, j-1], {j, n}]];
a[n_] := b[n, Infinity];
Array[a, 25] (* Jean-François Alcover, Apr 21 2020, after Alois P. Heinz *)
A097147
Total sum of minimum block sizes in all partitions of n-set.
Original entry on oeis.org
1, 3, 7, 21, 66, 258, 1079, 4987, 25195, 136723, 789438, 4863268, 31693715, 217331845, 1564583770, 11795630861, 92833623206, 760811482322, 6479991883525, 57256139503047, 523919025038279, 4956976879724565, 48424420955966635, 487810283307069696
Offset: 1
-
g:= proc(n, i, p) option remember; `if`(n=0, (i+1)*p!,
`if`(i<1, 0, add(g(n-i*j, i-1, p+j*i)/j!/i!^j, j=0..n/i)))
end:
a:= n-> g(n$2, 0):
seq(a(n), n=1..30); # Alois P. Heinz, Mar 06 2015
-
Drop[Apply[Plus,Table[nn=25;Range[0,nn]!CoefficientList[Series[Exp[Sum[ x^i/i!,{i,n,nn}]]-1,{x,0,nn}],x],{n,1,nn}]],1] (* Geoffrey Critzer, Jan 10 2013 *)
g[n_, i_, p_] := g[n, i, p] = If[n == 0, (i+1)*p!, If[i<1, 0,
Sum[g[n-i*j, i-1, p+j*i]/j!/i!^j, {j, 0, n/i}]]];
a[n_] := g[n, n, 0];
Array[a, 30] (* Jean-François Alcover, Aug 24 2021, after Alois P. Heinz *)
A097148
Total sum of maximum block sizes in all partitions of n-set.
Original entry on oeis.org
1, 3, 10, 35, 136, 577, 2682, 13435, 72310, 414761, 2524666, 16239115, 109976478, 781672543, 5814797281, 45155050875, 365223239372, 3070422740989, 26780417126048, 241927307839731, 2260138776632752, 21805163768404127, 216970086170175575, 2224040977932468379
Offset: 1
-
b:= proc(n, m) option remember; `if`(n=0, m, add(
b(n-j, max(j, m))*binomial(n-1, j-1), j=1..n))
end:
a:= n-> b(n, 0):
seq(a(n), n=1..24); # Alois P. Heinz, Mar 02 2020, revised May 08 2024
-
Drop[ Range[0, 22]! CoefficientList[ Series[ Sum[E^(E^x - 1) - E^Sum[x^j/j!, {j, 1, k}], {k, 0, 22}], {x, 0, 22}], x], 1] (* Robert G. Wilson v, Aug 05 2004 *)
A097145
Total sum of minimum list sizes in all sets of lists of n-set, cf. A000262.
Original entry on oeis.org
0, 1, 5, 25, 157, 1101, 9211, 85513, 900033, 10402633, 133059331, 1836961941, 27619253113, 444584808253, 7678546353843, 140944884572521, 2751833492404321, 56691826303303953, 1233793951629951043, 28191548364561422173, 676190806704598883241
Offset: 0
For n=4 we have 73 sets of lists (cf. A000262): (1234) (24 ways), (123)(4) (6*4 ways), (12)(34) (3*4 ways), (12)(3)(4) (6*2 ways), (1)(2)(3)(4) (1 way); so a(n)= 24*4+24*1+12*2+12*1+1*1 = 157.
-
b:= proc(n, m) option remember; `if`(n=0, m, add(j!*
b(n-j, min(m, j))*binomial(n-1, j-1), j=1..n))
end:
a:= n-> `if`(n=0, 0, b(n, infinity)):
seq(a(n), n=0..25); # Alois P. Heinz, May 10 2016
-
b[n_, m_] := b[n, m] = If[n==0, m, Sum[j!*b[n-j, Min[m, j]]*Binomial[n-1, j - 1], {j, 1, n}]]; a[n_] := If[n==0, 0, b[n, Infinity]]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Feb 18 2017, after Alois P. Heinz *)
A232193
Numerators of the expected value of the length of a random cycle in a random n-permutation.
Original entry on oeis.org
1, 3, 23, 55, 1901, 4277, 198721, 16083, 14097247, 4325321, 2132509567, 4527766399, 13064406523627, 905730205, 13325653738373, 362555126427073, 14845854129333883, 57424625956493833, 333374427829017307697, 922050973293317, 236387355420350878139797
Offset: 1
Expectations for n=1,... are 1/1, 3/2, 23/12, 55/24, 1901/720, 4277/1440, 198721/60480, 16083/4480, ... = A232193/A232248
For n=3 there are 6 permutations. We have probability 1/6 of selecting (1)(2)(3) and the cycle size is 1. We have probability 3/6 of selecting a permutation with cycle type (1)(23) and (on average) the cycle length is 3/2. We have probability 2/6 of selecting a permutation of the form (123) and the cycle size is 3. 1/6*1 + 3/6*3/2 + 2/6*3 = 23/12.
Cf.
A028417(n)/n! the expected value of the length of the shortest cycle in a random n-permutation.
Cf.
A028418(n)/n! the expected value of the length of the longest cycle in a random n-permutation.
-
with(combinat):
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
expand(add(multinomial(n, n-i*j, i$j)/j!*(i-1)!^j
*b(n-i*j, i-1) *x^j, j=0..n/i))))
end:
a:= n->numer((p->add(coeff(p, x, i)/i, i=1..n))(b(n$2))/(n-1)!):
seq(a(n), n=1..30); # Alois P. Heinz, Nov 21 2013
# second Maple program:
a:= n-> numer(add(abs(combinat[stirling1](n, i))/i, i=1..n)/(n-1)!):
seq(a(n), n=1..30); # Alois P. Heinz, Nov 23 2013
-
Table[Numerator[Total[Map[Total[#]!/Product[#[[i]],{i,1,Length[#]}]/Apply[Times,Table[Count[#,k]!,{k,1,Max[#]}]]/(Total[#]-1)!/Length[#]&,Partitions[n]]]],{n,1,25}]
A097146
Total sum of maximum list sizes in all sets of lists of n-set, cf. A000262.
Original entry on oeis.org
0, 1, 5, 31, 217, 1781, 16501, 172915, 1998641, 25468777, 352751941, 5292123431, 85297925065, 1472161501981, 27039872306357, 527253067633531, 10865963240550241, 236088078855319505, 5390956470528548101, 129102989125943058607, 3234053809095307670201, 84596120521251178630981, 2305894874979300173268085
Offset: 0
For n=4 we have 73 sets of lists (cf. A000262): (1234) (24 ways), (123)(4) (6*4 ways), (12)(34) (3*4 ways), (12)(3)(4) (6*2 ways), (1)(2)(3)(4) (1 way); so a(4)= 24*4+24*3+12*2+12*2+1*1 = 217.
-
b:= proc(n, m) option remember; `if`(n=0, m, add(j!*
b(n-j, max(m, j))*binomial(n-1, j-1), j=1..n))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..25); # Alois P. Heinz, May 10 2016
-
b[n_, m_] := b[n, m] = If[n == 0, m, Sum[j! b[n-j, Max[m, j]] Binomial[n-1, j-1], {j, 1, n}]];
a[n_] := b[n, 0];
a /@ Range[0, 25] (* Jean-François Alcover, Nov 05 2020, after Alois P. Heinz *)
-
N=50; x='x+O('x^N);
egf=exp(x/(1-x))*sum(k=1,N, (1-exp(x^k/(x-1))) );
Vec( serlaplace(egf) ) /* show terms */
A208248
Sum of the maximum cycle length over all functions f:{1,2,...,n} -> {1,2,...,n} (endofunctions).
Original entry on oeis.org
0, 1, 5, 40, 431, 5826, 94657, 1795900, 38963535, 951398890, 25819760021, 770959012704, 25117397416795, 886626537549130, 33708625339151505, 1373237757290215156, 59677939242566840303, 2755753623830236494930, 134746033233724391374765, 6954962673986411576581000
Offset: 0
-
b:= proc(n, m) option remember; `if`(n=0, m, add((j-1)!*
b(n-j, max(m, j))*binomial(n-1, j-1), j=1..n))
end:
a:= n-> add(b(j, 0)*n^(n-j)*binomial(n-1, j-1), j=0..n):
seq(a(n), n=0..20); # Alois P. Heinz, May 20 2016
-
nn=20; t=Sum[n^(n-1)x^n/n!, {n,1,nn}]; Apply[Plus, Table[Range[0,nn]! CoefficientList[Series[1/(1-t) - Exp[Sum[t^i/i, {i,1,n}]], {x,0,nn}], x], {n, 0, nn-1}]]
Showing 1-10 of 11 results.
Comments