cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

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

Views

Author

Alois P. Heinz, Apr 26 2017

Keywords

Comments

Each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements.

Examples

			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;
		

Crossrefs

Columns k=1-2 give: A001563, A285795.
Main diagonal and first lower diagonal give: A038720(n-1) (for n>1), A286175.
Row sums give A000142 * A000217 = A180119.

Formula

T(n,1) = n * n!.
T(n,n) = floor((n-1)!*(n+2)/2).

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

Views

Author

Alois P. Heinz, Apr 20 2017

Keywords

Comments

Each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements.

Examples

			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.
		

Crossrefs

Column k=1 of A286231.

Programs

  • Maple
    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);
  • Mathematica
    Table[n! * (n-1 + 2*(n+1)*HarmonicNumber[n])/4, {n, 1, 25}] (* Vaclav Kotesovec, Apr 29 2017 *)

Formula

Recursion: see Maple program.

A286232 Sum T(n,k) of the entries in the k-th last 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, 5, 1, 19, 10, 1, 75, 57, 17, 1, 323, 285, 145, 26, 1, 1512, 1421, 975, 317, 37, 1, 7630, 7395, 5999, 2865, 616, 50, 1, 41245, 40726, 36183, 22411, 7315, 1094, 65, 1, 237573, 237759, 221689, 163488, 72581, 16630, 1812, 82, 1, 1451359, 1468162, 1405001, 1160764, 649723, 206249, 34425, 2840, 101, 1
Offset: 1

Views

Author

Alois P. Heinz, May 04 2017

Keywords

Examples

			T(3,2) = 10 because the sum of the entries in the second last blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 0+3+4+1+2 = 10.
Triangle T(n,k) begins:
      1;
      5,     1;
     19,    10,     1;
     75,    57,    17,     1;
    323,   285,   145,    26,    1;
   1512,  1421,   975,   317,   37,    1;
   7630,  7395,  5999,  2865,  616,   50,  1;
  41245, 40726, 36183, 22411, 7315, 1094, 65, 1;
  ...
		

Crossrefs

Column k=1 gives A285424.
Main diagonal and first lower diagonal give: A000012, A002522.
Row sums give A000110(n) * A000217(n) = A105488(n+3).

Programs

  • Mathematica
    app[P_, n_] := Module[{P0}, Table[P0 = Append[P, {}]; AppendTo[P0[[i]], n]; If[Last[P0] == {}, Most[P0], P0], {i, 1, Length[P]+1}]];
    setPartitions[n_] := setPartitions[n] = If[n == 1, {{{1}}}, Flatten[app[#, n]& /@ setPartitions[n-1], 1]];
    T[n_, k_] := Select[setPartitions[n], Length[#] >= k&][[All, -k]] // Flatten // Total;
    Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Aug 21 2021 *)
Showing 1-3 of 3 results.