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-2 of 2 results.

A322383 Number T(n,k) of entries in the k-th cycles of all permutations of [n] when cycles are ordered by increasing 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, 10, 7, 1, 45, 37, 13, 1, 236, 241, 101, 21, 1, 1505, 1661, 896, 226, 31, 1, 10914, 13301, 7967, 2612, 442, 43, 1, 90601, 117209, 78205, 29261, 6441, 785, 57, 1, 837304, 1150297, 827521, 346453, 88909, 14065, 1297, 73, 1, 8610129, 12314329, 9507454, 4338214, 1253104, 234646, 28006, 2026, 91, 1
Offset: 1

Views

Author

Alois P. Heinz, Dec 05 2018

Keywords

Examples

			The 6 permutations of {1,2,3} are:
  (1)     (2)   (3)
  (1)     (2,3)
  (2)     (1,3)
  (3)     (1,2)
  (1,2,3)
  (1,3,2)
so there are 10 elements in the first cycles, 7 in the second cycles and only 1 in the third cycles.
Triangle T(n,k) begins:
      1;
      3,      1;
     10,      7,     1;
     45,     37,    13,     1;
    236,    241,   101,    21,    1;
   1505,   1661,   896,   226,   31,   1;
  10914,  13301,  7967,  2612,  442,  43,  1;
  90601, 117209, 78205, 29261, 6441, 785, 57, 1;
  ...
		

Crossrefs

Row sums give A001563.

Programs

  • Maple
    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);
  • Mathematica
    b[n_, l_] := b[n, l] = If[n == 0, l.x^Range[Length[l]], Sum[Binomial[n - 1, j - 1] b[n - j, Sort[Append[l, j]]] (j - 1)!, {j, 1, n}]];
    T[n_] := Rest @ CoefficientList[b[n, {}], x];
    Array[T, 12] // Flatten (* Jean-François Alcover, Mar 03 2020, 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

Views

Author

Steven Finch, Dec 08 2021

Keywords

Comments

If the permutation has no third cycle, then its third-longest cycle is defined to have length 0.

Examples

			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;
...
		

Crossrefs

Column 0 gives 1 together with A000774.
Column 1 gives the column 3 of A208956.
Row sums give A000142.

Programs

  • Maple
    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
  • Mathematica
    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 *)

Formula

Sum_{k=0..n-2} k * T(n,k) = A332907(n) for n >= 3. - Alois P. Heinz, Dec 12 2021
Showing 1-2 of 2 results.