A285362
Sum T(n,k) of the entries in the k-th blocks of all set partitions of [n]; triangle T(n,k), n>=1, 1<=k<=n, read by rows.
Original entry on oeis.org
1, 4, 2, 15, 12, 3, 60, 58, 28, 4, 262, 273, 185, 55, 5, 1243, 1329, 1094, 495, 96, 6, 6358, 6839, 6293, 3757, 1148, 154, 7, 34835, 37423, 36619, 26421, 11122, 2380, 232, 8, 203307, 217606, 219931, 180482, 96454, 28975, 4518, 333, 9, 1257913, 1340597, 1376929, 1230737, 787959, 308127, 67898, 7995, 460, 10
Offset: 1
T(3,2) = 12 because the sum of the entries in the second blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 0+3+2+5+2 = 12.
Triangle T(n,k) begins:
1;
4, 2;
15, 12, 3;
60, 58, 28, 4;
262, 273, 185, 55, 5;
1243, 1329, 1094, 495, 96, 6;
6358, 6839, 6293, 3757, 1148, 154, 7;
34835, 37423, 36619, 26421, 11122, 2380, 232, 8;
...
Main diagonal and first lower diagonal give:
A000027,
A006000 (for n>0).
-
T:= proc(h) option remember; local b; b:=
proc(n, m) option remember; `if`(n=0, [1, 0], add((p-> p
+[0, (h-n+1)*p[1]*x^j])(b(n-1, max(m, j))), j=1..m+1))
end: (p-> seq(coeff(p, x, i), i=1..n))(b(h, 0)[2])
end:
seq(T(n), n=1..12);
-
T[h_] := T[h] = Module[{b}, b[n_, m_] := b[n, m] = If[n == 0, {1, 0}, Sum[# + {0, (h - n + 1)*#[[1]]*x^j}&[b[n - 1, Max[m, j]]], {j, 1, m + 1}]]; Table[Coefficient[#, x, i], {i, 1, n}]&[b[h, 0][[2]]]];
Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Apr 30 2018, after Alois P. Heinz *)
A185105
Number T(n,k) of entries in the k-th cycles of all permutations of {1,2,..,n}; each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements.
Original entry on oeis.org
1, 3, 1, 12, 5, 1, 60, 27, 8, 1, 360, 168, 59, 12, 1, 2520, 1200, 463, 119, 17, 1, 20160, 9720, 3978, 1177, 221, 23, 1, 181440, 88200, 37566, 12217, 2724, 382, 30, 1, 1814400, 887040, 388728, 135302, 34009, 5780, 622, 38, 1, 19958400, 9797760, 4385592, 1606446, 441383, 86029, 11378, 964, 47, 1
Offset: 1
The six permutations of n=3 in ordered cycle form are:
{ {1}, {2}, {3} }
{ {1}, {2, 3}, {} }
{ {1, 2}, {3}, {} }
{ {1, 2, 3}, {}, {}}
{ {1, 3, 2}, {}, {}}
{ {1, 3}, {2}, {} }
.
The lengths of the cycles in position k=1 sum to 12, those of the cycles in position k=2 sum to 5 and those of the cycles in position k=3 sum to 1.
Triangle begins:
1;
3, 1;
12, 5, 1;
60, 27, 8, 1;
360, 168, 59, 12, 1;
2520, 1200, 463, 119, 17, 1;
20160, 9720, 3978, 1177, 221, 23, 1;
181440, 88200, 37566, 12217, 2724, 382, 30, 1;
...
-
b:= proc(n, i) option remember; expand(`if`(n=0, 1,
add((p-> p+coeff(p, x, 0)*j*x^i)(b(n-j, i+1))*
binomial(n-1, j-1)*(j-1)!, j=1..n)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n, 1)):
seq(T(n), n=1..12); # Alois P. Heinz, Apr 15 2017
-
Table[it = Join[RotateRight /@ ToCycles[#], Table[{}, {k}]] & /@ Permutations[Range[n]]; Tr[Length[Part[#, k]]& /@ it], {n, 7}, {k, n}]
(* Second program: *)
b[n_, i_] := b[n, i] = Expand[If[n==0, 1, Sum[Function[p, p + Coefficient[ p, x, 0]*j*x^i][b[n-j, i+1]]*Binomial[n-1, j-1]*(j-1)!, {j, 1, n}]]];
T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, n}]][b[n, 1]];
Array[T, 12] // Flatten (* Jean-François Alcover, May 30 2018, after Alois P. Heinz *)
A180119
a(n) = (n+2)! * Sum_{k = 1..n} 1/((k+1)*(k+2)).
Original entry on oeis.org
0, 1, 6, 36, 240, 1800, 15120, 141120, 1451520, 16329600, 199584000, 2634508800, 37362124800, 566658892800, 9153720576000, 156920924160000, 2845499424768000, 54420176498688000, 1094805903679488000, 23112569077678080000, 510909421717094400000, 11802007641664880640000
Offset: 0
- Vincenzo Librandi, Table of n, a(n) for n = 0..300
- A. M. Hinz, S. Klavžar, U. Milutinović, and C. Petr, The Tower of Hanoi - Myths and Maths, Birkhäuser 2013. See page 209. Book's website
- H. W. Gould, ed. J. Quaintance, Combinatorial Identities, May 2010 (section 10, p.45).
-
[n*Factorial(n+2)/(2*(n+2)): n in [0..25]]; // Vincenzo Librandi, Feb 20 2017
-
a:= n-> n*(n+2)!/(2*(n+2)): seq(a(n), n=0..20);
-
Table[n (n + 2)! / (2 (n + 2)), {n, 0, 30}] (* Vincenzo Librandi, Feb 20 2017 *)
-
a(n) = (n+2)! * sum(k=1, n,1/((k+1)*(k+2))); \\ Michel Marcus, Jan 10 2015
-
apply( A180119(n)=(n+1)!\2*n, [0..20]) \\ M. F. Hasler, Apr 10 2018
A285793
Sum T(n,k) of the k-th entries in all cycles of all permutations of [n]; triangle T(n,k), n>=1, 1<=k<=n, read by rows.
Original entry on oeis.org
1, 4, 2, 18, 13, 5, 96, 83, 43, 18, 600, 582, 342, 192, 84, 4320, 4554, 2874, 1824, 1068, 480, 35280, 39672, 26232, 17832, 11784, 7080, 3240, 322560, 382248, 261288, 185688, 131256, 88920, 54360, 25200, 3265920, 4044240, 2834640, 2078640, 1534320, 1110960, 765360, 473760, 221760
Offset: 1
T(3,2) = 13 because the sum of the second entries in all cycles of all permutations of [3] ((123), (132), (12)(3), (13)(2), (1)(23), (1)(2)(3)) is 2+3+2+3+3+0 = 13.
Triangle T(n,k) begins:
: 1;
: 4, 2;
: 18, 13, 5;
: 96, 83, 43, 18;
: 600, 582, 342, 192, 84;
: 4320, 4554, 2874, 1824, 1068, 480;
: 35280, 39672, 26232, 17832, 11784, 7080, 3240;
: 322560, 382248, 261288, 185688, 131256, 88920, 54360, 25200;
Main diagonal and first lower diagonal give:
A038720(n-1) (for n>1),
A286175.
A284816
Sum of entries in the first cycles of all permutations of [n].
Original entry on oeis.org
1, 4, 21, 132, 960, 7920, 73080, 745920, 8346240, 101606400, 1337212800, 18920563200, 286442956800, 4620449433600, 79114299264000, 1433211107328000, 27387931963392000, 550604138692608000, 11617107089043456000, 256671161862635520000, 5926549291918295040000
Offset: 1
a(3) = 21 because the sum of the entries in the first cycles of all permutations of [3] ((123), (132), (12)(3), (13)(2), (1)(23), (1)(2)(3)) is 6+6+3+4+1+1 = 21.
-
a:= n-> n!*(n*(n+1)-(n-1)*(n+2)/2)/2:
seq(a(n), n=1..25);
# second Maple program:
a:= proc(n) option remember; `if`(n<2, n,
(n^2+n+2)*n*a(n-1)/(n^2-n+2))
end:
seq(a(n), n=1..25);
A285382
Sum of entries in the last cycles of all permutations of [n].
Original entry on oeis.org
1, 5, 25, 143, 942, 7074, 59832, 563688, 5858640, 66622320, 823055040, 10979133120, 157300375680, 2409321801600, 39290164300800, 679701862425600, 12433400027596800, 239791474805299200, 4863054420016128000, 103462238924835840000, 2304147629440419840000
Offset: 1
a(3) = 25 because the sum of the entries in the last cycles of all permutations of [3] ((123), (132), (12)(3), (13)(2), (1)(23), (1)(2)(3)) is 6+6+3+2+5+3 = 25.
-
a:= proc(n) option remember; `if`(n<3, n*(3*n-1)/2,
((2*n^2+3*n-1)*a(n-1)-(n+2)*(n-1)*n*a(n-2))/(n+1))
end:
seq(a(n), n=1..25);
-
Table[n! * (n-1 + 2*(n+1)*HarmonicNumber[n])/4, {n, 1, 25}] (* Vaclav Kotesovec, Apr 29 2017 *)
A285489
Sum of entries in the second cycles of all permutations of [n].
Original entry on oeis.org
2, 12, 76, 545, 4422, 40194, 405072, 4484808, 54121680, 707105520, 9944043840, 149769846720, 2405254884480, 41029304803200, 740857462732800, 14117363667993600, 283111532808652800, 5960312380873267200, 131434781395405824000, 3029635129259289600000
Offset: 2
a(3) = 12 because the sum of the entries in the second cycles of all permutations of [3] ((123), (132), (12)(3), (13)(2), (1)(23), (1)(2)(3)) is 0+0+3+2+5+2 = 12.
-
a:= proc(n) option remember; `if`(n<3, (n-1)*n,
((2*n^3-7*n^2+11*n-8)*n*a(n-1)-(n-1)*(n-2)
*(n^2-n+2)*n*a(n-2))/((n^2-3*n+4)*(n-1)))
end:
seq(a(n), n=2..25);
-
a[2] = 2; a[3] = 12; a[n_] := a[n] = ((2n^3 - 7n^2 + 11n - 8) n a[n-1] - (n-1)(n-2)(n^2 - n + 2) n a[n-2])/((n^2 - 3n + 4)(n-1));
Table[a[n], {n, 2, 25}] (* Jean-François Alcover, Jun 01 2018, from Maple *)
Showing 1-7 of 7 results.
Comments