Original entry on oeis.org
1, 1, 4, 11, 35, 147, 805, 5399, 42273, 375787, 3728261, 40788255, 487539769, 6319430483, 88272658797, 1321745733511, 21117967813025, 358591883025339, 6448525343069653, 122424951294889967, 2446864618294774281, 51354975368171586595, 1129258990476358286909
Offset: 0
-
A339034[n_] := If[n == 0, 1, n! + Sum[(n+1-k)*(k-1)!, {k, n-1}]];
Array[A339034, 25, 0] (* Paolo Xausa, Jan 31 2024 *)
-
a(n) = if (n==0, 1, n! - (n-1)! + sum(k=1, n, (n+1-k)*(k-1)!)); \\ Michel Marcus, Dec 02 2020
-
def A339034(n):
if n == 0: return 1
d = factorial(n) - factorial(n - 1)
return add((n + 1 - k)*factorial(k - 1) for k in (1..n)) + d
print([A339034(n) for n in (0..22)])
A092271
Triangle read by rows. First in a series of triangular arrays counting permutations of partitions.
Original entry on oeis.org
1, 1, 1, 2, 3, 1, 6, 8, 6, 1, 24, 30, 20, 10, 1, 120, 144, 90, 40, 15, 1, 720, 840, 504, 210, 70, 21, 1, 5040, 5760, 3360, 1344, 420, 112, 28, 1, 40320, 45360, 25920, 10080, 3024, 756, 168, 36, 1, 362880, 403200, 226800, 86400, 25200, 6048, 1260, 240, 45, 1, 3628800, 3991680, 2217600, 831600, 237600, 55440, 11088, 1980, 330, 55, 1
Offset: 1
The triangle begins:
1: 1
2: 1 1
3: 2 3 1
4: 6 8 6 1
5: 24 30 20 10 1
6: 120 144 90 40 15 1
...
From _Peter Luschny_, Nov 19 2020: (Start):
The combinatorial interpretation is illustrated by this computation of row 6:
6! / aut([6]) = 720 / A339033(6, 1) = 720/6 = 120 = T(6, 1)
6! / aut([5, 1]) = 720 / A339033(6, 2) = 720/5 = 144 = T(6, 2)
6! / aut([4, 1, 1]) = 720 / A339033(6, 3) = 720/8 = 90 = T(6, 3)
6! / aut([3, 1, 1, 1]) = 720 / A339033(6, 4) = 720/18 = 40 = T(6, 4)
6! / aut([2, 1, 1, 1, 1]) = 720 / A339033(6, 5) = 720/48 = 15 = T(6, 5)
6! / aut([1, 1, 1, 1, 1, 1]) = 720 / A339033(6, 6) = 720/720 = 1 = T(6, 6)
-------------------------------------------------------------------------------
Sum: 410 = A121726(6)
(End)
- Abramowitz and Stegun, p. 831.
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
Cf.
A007290,
A025487,
A086141,
A090774,
A008290,
A111492,
A211603,
A238363,
A121726,
A339016,
A339033.
-
f[list_] :=Total[list]!/Apply[Times, list]/Apply[Times, Map[Length, Split[list]]!];Table[Append[Map[f, Select[Partitions[n], Count[#, Except[1]] == 1 &]], 1], {n,1, 10}] // Grid (* Geoffrey Critzer, Nov 07 2015 *)
-
def A092271(n, k):
if n == k: return 1
return factorial(n) // ((n + 1 - k)*factorial(k - 1))
for n in (1..9): print(n, [A092271(n, k) for k in (1..n)])
def A092271Row(n):
if n == 0: return [1]
f = factorial(n); S = []
for k in range(n,0,-1):
for p in Partitions(n, max_part=k, inner=[k], length=n+1-k):
S.append(f // p.aut())
return S
for n in (1..9): print(A092271Row(n)) # Peter Luschny, Nov 20 2020
A121726
Sum sequence A000522 then subtract 0,1,2,3,4,5,...
Original entry on oeis.org
1, 2, 6, 21, 85, 410, 2366, 16065, 125665, 1112074, 10976174, 119481285, 1421542629, 18348340114, 255323504918, 3809950976993, 60683990530209, 1027542662934898, 18430998766219318, 349096664728623317, 6962409983976703317, 145841989688186383338, 3201192743180799343822
Offset: 1
A000522 begins 1 2 5 16 65 326 ...
with sums 1 3 8 24 89 415 ...
so sequence begins 1 2 6 21 85 410 ...
.
From _Peter Luschny_, Nov 19 2020: (Start):
The combinatorial interpretation is illustrated by this computation of a(5):
5! / aut([5]) = 120 / A339033(5, 1) = 120/5 = 24
5! / aut([4, 1]) = 120 / A339033(5, 2) = 120/4 = 30
5! / aut([3, 1, 1]) = 120 / A339033(5, 3) = 120/6 = 20
5! / aut([2, 1, 1, 1]) = 120 / A339033(5, 4) = 120/12 = 10
5! / aut([1, 1, 1, 1, 1]) = 120 / A339033(5, 5) = 120/120 = 1
--------------------------------------------------------------
Sum: a(5) = 85
(End)
-
f[list_] :=Total[list]!/Apply[Times, list]/Apply[Times, Map[Length, Split[list]]!]; Table[Total[Map[f, Select[Partitions[n], Count[#, Except[1]] == 1 &]]] + 1, {n, 1, 20}] (* Geoffrey Critzer, Nov 07 2015 *)
-
A000522(n)={ return( sum(k=0,n,n!/k!)) ; } A121726(n)={ return(sum(k=0,n-1,A000522(k))-n+1) ; } { for(n=1,25, print1(A121726(n),",") ; ) ; } \\ R. J. Mathar, Sep 02 2006
-
def A121726(n):
def h(n, k):
if n == k: return 1
return factorial(n)//((n + 1 - k)*factorial(k - 1))
return sum(h(n, k) for k in (1..n))
print([A121726(n) for n in (1..23)])
# Demonstrates the combinatorial view:
def A121726(n):
if n == 0: return 1
f = factorial(n); S = 0
for k in (0..n):
for p in Partitions(n, max_part=k, inner=[k], length=n+1-k):
S += (f // p.aut())
return S
print([A121726(n) for n in (1..23)]) # Peter Luschny, Nov 20 2020
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))
Showing 1-4 of 4 results.
Comments