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

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

Original entry on oeis.org

1, 1, 2, 5, 1, 17, 7, 74, 46, 394, 311, 15, 2484, 2241, 315, 18108, 17627, 4585, 149904, 152839, 57897, 2240, 1389456, 1460944, 705600, 72800, 14257440, 15326180, 8673060, 1660120, 160460640, 175421214, 110271546, 31600800, 1247400, 1965444480, 2177730270, 1469308698, 559402272, 55135080
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,      7;
[5]     74,     46;
[6]    394,    311,    15;
[7]   2484,   2241,   315;
[8]  18108,  17627,  4585;
[9] 149904, 152839, 57897, 2240;
...
		

Crossrefs

Column 0 gives 1 together with A000774.
Row sums give A000142.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, x^l[1], add((j-1)!*
          b(n-j, sort([l[], j])[2..4])*binomial(n-1, j-1), j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, [0$3])):
    seq(lprint(T(n)), n=0..14);  # Alois P. Heinz, Dec 11 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 ;; 4]]]*Binomial[n - 1, j - 1], {j, 1, n}]];
    T[n_] := With[{p = b[n, {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 28 2021, after Alois P. Heinz *)

Formula

Sum_{k=0..floor(n/3)} k * T(n,k) = A332852(n) for n >= 3. - Alois P. Heinz, Dec 12 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

A332906 Number of entries in the second cycles of all permutations of [n] when cycles are ordered by increasing lengths.

Original entry on oeis.org

1, 7, 37, 241, 1661, 13301, 117209, 1150297, 12314329, 144593989, 1828734689, 24995387561, 365311053953, 5707795873261, 94637770625761, 1665132643843201, 30896642665904609, 604541044692565157, 12416248460455779089, 267500866283111679289, 6024053249628809274769
Offset: 2

Views

Author

Alois P. Heinz, Mar 02 2020

Keywords

Crossrefs

Column k=2 of A322383.
Cf. A349980.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, [1, 0], `if`(i>n, 0,
          add((p-> p+`if`(t>0 and t-j<1, [0, p[1]*i], 0))((i-1)!^j*
            b(n-i*j, i+1, max(0, t-j))/j!*combinat[multinomial]
             (n, i$j, n-i*j)), j=0..n/i)))
        end:
    a:= n-> b(n, 1, 2)[2]:
    seq(a(n), n=2..22);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, {1, 0}, If[i>n, 0, Sum[Function[ p, p + If[p =!= 0 && t>0 && t - j < 1, {0, p[[1]]*i}, {0, 0}]][(i-1)!^j* b[n - i*j, i + 1, Max[0, t - j]]/j!*multinomial[n, Append[Array[i&, j], n - i*j]]], {j, 0, n/i}]]];
    a[n_] := b[n, 1, 2][[2]];
    a /@ Range[2, 22] (* Jean-François Alcover, Apr 21 2020, after Alois P. Heinz *)

Formula

a(n) = Sum_{k>=0} k * A349980(n,k). - Alois P. Heinz, Dec 07 2021
Showing 1-6 of 6 results.