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

A349979 Irregular triangle read by rows: T(n,k) is the number of n-permutations whose second-longest cycle has length exactly k; n>=0, 0<=k<=floor(n/2).

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 6, 15, 3, 24, 61, 35, 120, 290, 270, 40, 720, 1646, 1974, 700, 5040, 11025, 14707, 8288, 1260, 40320, 85345, 117459, 90272, 29484, 362880, 749194, 1023390, 974720, 446040, 72576, 3628800, 7347374, 9813210, 10666480, 6332040, 2128896
Offset: 0

Views

Author

Steven Finch, Dec 07 2021

Keywords

Comments

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

Examples

			Triangle begins:
[0]     1;
[1]     1;
[2]     1,     1;
[3]     2,     4;
[4]     6,    15,      3;
[5]    24,    61,     35;
[6]   120,   290,    270,    40;
[7]   720,  1646,   1974,   700;
[8]  5040, 11025,  14707,  8288,  1260;
[9] 40320, 85345, 117459, 90272, 29484;
    ...
		

Crossrefs

Column 0 gives 1 together with A000142.
Column 1 gives 1 - (n-1)! + A006231(n).
Row sums give A000142.
T(2n,n) gives A110468(n-1) for n>=1.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, x^l[1], add((j-1)!*
          b(n-j, sort([l[], j])[2..3])*binomial(n-1, j-1), j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n/2))(b(n, [0$2])):
    seq(T(n), n=0..12);  # Alois P. Heinz, Dec 07 2021
  • Mathematica
    b[n_, l_] := b[n, l] = If[n == 0, x^l[[1]], Sum[(j - 1)!*b[n - j, Sort[ Append[l, j]][[2 ;; 3]]]*Binomial[n - 1, j - 1], {j, 1, n}]];
    T[n_] := With[{p = b[n, {0, 0}]}, Table[Coefficient[p, x, i], {i, 0, n/2}]];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)

Formula

Sum_{k=0..floor(n/2)} k * T(n,k) = A332851(n). - Alois P. Heinz, Dec 07 2021

A349980 Irregular triangle read by rows: T(n,k) is the number of n-permutations whose second-shortest cycle has length exactly k; n >= 0, 0 <= k <= max(0,n-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 6, 7, 3, 8, 24, 31, 15, 20, 30, 120, 191, 135, 40, 90, 144, 720, 1331, 945, 280, 420, 504, 840, 5040, 10655, 7077, 4480, 1260, 2688, 3360, 5760, 40320, 95887, 64197, 41552, 11340, 18144, 20160, 25920, 45360, 362880, 958879, 646965, 395360, 238140, 72576, 151200, 172800, 226800, 403200
Offset: 0

Views

Author

Steven Finch, Dec 07 2021

Keywords

Comments

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

Examples

			Triangle begins:
[0]     1;
[1]     1;
[2]     1,     1;
[3]     2,     1,     3;
[4]     6,     7,     3,     8;
[5]    24,    31,    15,    20,    30;
[6]   120,   191,   135,    40,    90,   144;
[7]   720,  1331,   945,   280,   420,   504,   840;
[8]  5040, 10655,  7077,  4480,  1260,  2688,  3360,  5760;
[9] 40320, 95887, 64197, 41552, 11340, 18144, 20160, 25920, 45360;
    ...
		

Crossrefs

Column 0 gives 1 together with A000142.
Column 1 gives the nonzero terms of A155521.
Row sums give A000142.
T(n,n-1) gives A059171(n) for n>=1.

Programs

  • Maple
    m:= infinity:
    b:= proc(n, l) option remember; `if`(n=0, x^`if`(l[2]=m,
          0, l[2]), add(b(n-j, sort([l[], j])[1..2])
                   *binomial(n-1, j-1)*(j-1)!, j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..max(0, n-1)))(b(n, [m$2])):
    seq(T(n), n=0..10);  # Alois P. Heinz, Dec 07 2021
  • Mathematica
    m = Infinity;
    b[n_, l_] := b[n, l] = If[n == 0, x^If[l[[2]] == m, 0, l[[2]]], Sum[b[n-j, Sort[Append[l, j]][[1;;2]]]*Binomial[n - 1, j - 1]*(j - 1)!, {j, 1, n}]];
    T[n_] := With[{p = b[n, {m, m}]}, Table[Coefficient[p, x, i], {i, 0, Max[0, n - 1]}]];
    Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Dec 28 2021, after Alois P. Heinz *)

Formula

Sum_{k=0..max(0,n-1)} k * T(n,k) = A332906(n). - Alois P. Heinz, Dec 07 2021

Extensions

More terms from Alois P. Heinz, Dec 07 2021

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

A350273 Irregular triangle read by rows: T(n,k) is the number of n-permutations whose fourth-longest cycle has length exactly k; n >= 0, 0 <= k <= floor(n/4).

Original entry on oeis.org

1, 1, 2, 6, 23, 1, 109, 11, 619, 101, 4108, 932, 31240, 8975, 105, 268028, 91387, 3465, 2562156, 991674, 74970, 27011016, 11514394, 1391390, 311378616, 143188574, 24188010, 246400, 3897004032, 1905067958, 412136010, 12812800, 52626496896, 27059601596, 7053834788, 438357920
Offset: 0

Views

Author

Steven Finch, Dec 22 2021

Keywords

Comments

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

Examples

			Triangle begins:
[0]      1;
[1]      1;
[2]      2;
[3]      6;
[4]     23,     1;
[5]    109,    11;
[6]    619,   101;
[7]   4108,   932;
[8]  31240,  8975,  105;
[9] 268028, 91387, 3465;
    ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, x^l[1], add((j-1)!*
          b(n-j, sort([l[], j])[2..5])*binomial(n-1, j-1), j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$4])):
    seq(T(n), n=0..14);  # Alois P. Heinz, Dec 22 2021
  • Mathematica
    b[n_, l_] := b[n, l] = If[n == 0, x^l[[1]], Sum[(j - 1)!*b[n - j, Sort[ Append[l, j]][[2 ;; 5]]]*Binomial[n - 1, j - 1], {j, 1, n}]];
    T[n_] := With[{p = b[n, {0, 0, 0, 0}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]];
    Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Dec 29 2021, after Alois P. Heinz *)

Formula

Sum_{k=0..floor(n/4)} k * T(n,k) = A332853(n) for n >= 4.

Extensions

More terms from Alois P. Heinz, Dec 22 2021

A350274 Triangle read by rows: T(n,k) is the number of n-permutations whose fourth-shortest cycle has length exactly k; n >= 0, 0 <= k <= max(0,n-3).

Original entry on oeis.org

1, 1, 2, 6, 23, 1, 109, 1, 10, 619, 16, 45, 40, 4108, 92, 210, 420, 210, 31240, 771, 1645, 2800, 2520, 1344, 268028, 6883, 17325, 15960, 26460, 18144, 10080, 2562156, 68914, 173250, 148400, 226800, 211680, 151200, 86400, 27011016, 757934, 1854930, 1798720, 1801800, 2494800, 1940400, 1425600, 831600
Offset: 0

Views

Author

Steven Finch, Dec 22 2021

Keywords

Comments

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

Examples

			Triangle begins:
[0]      1;
[1]      1;
[2]      2;
[3]      6;
[4]     23,    1;
[5]    109,    1,    10;
[6]    619,   16,    45,    40;
[7]   4108,   92,   210,   420,   210;
[8]  31240,  771,  1645,  2800,  2520,  1344;
[9] 268028, 6883, 17325, 15960, 26460, 18144, 10080;
    ...
		

Crossrefs

Column 0 is 1 for n=0, together with A000142(n) - A122105(n-1) for n>=1.
Row sums give A000142.

Programs

  • Maple
    m:= infinity:
    b:= proc(n, l) option remember; `if`(n=0, x^`if`(l[4]=m,
          0, l[4]), add(b(n-j, sort([l[], j])[1..4])
                   *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$4])):
    seq(T(n), n=0..11);  # Alois P. Heinz, Dec 22 2021
  • Mathematica
    m = Infinity;
    b[n_, l_] := b[n, l] = If[n == 0, x^If[l[[4]] == m, 0, l[[4]]], Sum[b[n-j, Sort[Append[l, j]][[1 ;; 4]]]*Binomial[n-1, j-1]*(j-1)!, {j, 1, n}]];
    T[n_] := With[{p = b[n, {m, m, m, m}]}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]];
    Table[T[n], {n, 0, 11}] // Flatten (* Jean-François Alcover, Dec 29 2021, after Alois P. Heinz *)

Formula

Sum_{k=0..n-3} k * T(n,k) = A332908(n) for n >= 4.

Extensions

More terms from Alois P. Heinz, Dec 22 2021

A332852 Number of entries in the third cycles of all permutations of [n] when cycles are ordered by decreasing lengths.

Original entry on oeis.org

1, 7, 46, 341, 2871, 26797, 275353, 3090544, 37652660, 495756306, 7015094802, 106125820737, 1710625964061, 29267936828691, 529655709670675, 10110999740354242, 203072647138681534, 4280118000323963708, 94470690960204259548, 2179212745888578818307
Offset: 3

Views

Author

Alois P. Heinz, Feb 26 2020

Keywords

Crossrefs

Column k=3 of A322384.
Cf. A350015.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, l[3], add((j-1)!*b(n-j,
          sort([l[], j], `>`)[1..3])*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> b(n, [0$3]):
    seq(a(n), n=3..23);
  • Mathematica
    b[n_, l_] := b[n, l] = If[n == 0, l[[3]], Sum[(j-1)! b[n-j, ReverseSort[ Append[l, j]][[1 ;; 3]]] Binomial[n - 1, j - 1], {j, 1, n}]];
    a[n_] := b[n, {0, 0, 0}];
    a /@ Range[3, 23] (* Jean-François Alcover, Mar 01 2020, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=0..floor(n/3)} k * A350015(n,k). - Alois P. Heinz, Dec 12 2021
Showing 1-6 of 6 results.