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

A275311 Number of set partitions of [n] with nondecreasing block sizes.

Original entry on oeis.org

1, 1, 2, 3, 7, 12, 43, 89, 363, 1096, 4349, 14575, 77166, 265648, 1369284, 6700177, 33526541, 162825946, 1034556673, 5157939218, 33054650345, 206612195885, 1244742654646, 8071979804457, 62003987375957, 381323590616995, 2827411772791596, 22061592185044910
Offset: 0

Views

Author

Alois P. Heinz, Jul 22 2016

Keywords

Examples

			a(3) = 3: 123, 1|23, 1|2|3.
a(4) = 7: 1234, 12|34, 13|24, 14|23, 1|234, 1|2|34, 1|2|3|4.
a(5) = 12: 12345, 12|345, 13|245, 14|235, 15|234, 1|2345, 1|23|45, 1|24|35, 1|25|34, 1|2|345, 1|2|3|45, 1|2|3|4|5.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
          add(b(n-j, j)*binomial(n-1, j-1), j=i..n))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n-j, j]*Binomial[n-1, j-1], {j, i, n}]]; a[n_] := b[n, 1]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jan 22 2017, translated from Maple *)

A286071 Number of permutations of [n] with nonincreasing cycle sizes.

Original entry on oeis.org

1, 1, 2, 5, 19, 85, 496, 3229, 25117, 215225, 2100430, 22187281, 261228199, 3284651245, 45163266604, 659277401525, 10380194835601, 172251467909809, 3057368096689690, 56867779157145769, 1122474190194034555, 23137433884903034501, 502874858021076645784
Offset: 0

Views

Author

Alois P. Heinz, May 01 2017

Keywords

Comments

Each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements.
a(n) is even if and only if n in { A016825 }.

Examples

			a(3) = 5: (123), (132), (12)(3), (13)(2), (1)(2)(3).
a(4) = 19: (1234), (1243), (1324), (1342), (1423), (1432), (123)(4), (132)(4), (124)(3), (142)(3), (12)(34), (12)(3)(4), (134)(2), (143)(2), (13)(24), (13)(2)(4), (14)(23), (14)(2)(3), (1)(2)(3)(4).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add((j-1)!*
          b(n-j, j)*binomial(n-1, j-1), j=1..min(n, i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[(j - 1)!*b[n - j, j]*Binomial[n - 1, j - 1], {j, 1, Min[n, i]}]];
    a[n_] := b[n, n];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 24 2018, translated from Maple *)

A286072 Number of permutations of [n] where adjacent cycles differ in size.

Original entry on oeis.org

1, 1, 1, 5, 16, 84, 512, 3572, 28080, 256820, 2553728, 28064776, 337319944, 4385615904, 61255920936, 921584068648, 14720437293952, 250190161426720, 4507229152534944, 85630125536152160, 1711040906290680448, 35969941361999955392, 790961860293623563648
Offset: 0

Views

Author

Alois P. Heinz, May 01 2017

Keywords

Comments

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

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add(`if`(i=j, 0,
          (j-1)!*b(n-j, `if`(j>n-j, 0, j))*binomial(n-1, j-1)), j=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[If[i == j, 0, (j - 1)!*b[n - j, If[j > n - j, 0, j]]*Binomial[n - 1, j - 1]], {j, 1, n}]];
    a[n_] := b[n, 0];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 24 2018, translated from Maple *)

A286073 Number of permutations of [n] with decreasing cycle sizes.

Original entry on oeis.org

1, 1, 1, 4, 12, 60, 340, 2280, 17220, 151872, 1459584, 15624000, 182318400, 2316837600, 31596570720, 465582237120, 7283287851840, 121620647715840, 2149774858183680, 40196871701360640, 790002144844738560, 16364478334463078400, 354458730544573132800
Offset: 0

Views

Author

Alois P. Heinz, May 01 2017

Keywords

Comments

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

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember;
          `if`(n>i*(i+1)/2, 0, `if`(n=0, 1, b(n, i-1)+
          `if`(i>n, 0, b(n-i, i-1)*(i-1)!*binomial(n-1, i-1))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n > i*(i + 1)/2, 0, If[n == 0, 1, b[n, i - 1] + If[i > n, 0, b[n - i, i - 1]*(i - 1)!*Binomial[n - 1, i - 1]]]];
    a[n_] := b[n, n];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 24 2018, translated from Maple *)

A286075 Number of permutations of [n] with increasing cycle sizes.

Original entry on oeis.org

1, 1, 1, 3, 8, 38, 182, 1194, 7932, 69192, 591936, 6286272, 66914880, 840036960, 10567285920, 154755036000, 2246755924800, 37283584936320, 618705247829760, 11472473012232960, 212762383625594880, 4386435706887413760, 89954629722500659200, 2030764767987849062400
Offset: 0

Views

Author

Alois P. Heinz, May 01 2017

Keywords

Comments

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

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i>n, 0,
          b(n, i+1)+b(n-i, i+1)*(i-1)!*binomial(n-1, i-1)))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i > n, 0, b[n, i + 1] + b[n - i, i + 1]*(i - 1)!*Binomial[n - 1, i - 1]]];
    a[n_] := b[n, 1];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 28 2018, from Maple *)

A286076 Number of permutations of [n] with alternating cycle size parities.

Original entry on oeis.org

1, 1, 1, 5, 8, 78, 206, 2722, 10516, 169544, 883580, 16569420, 110272040, 2339828920, 19127099680, 450962267600, 4399562960000, 113769961266000, 1295735797694000, 36390357922438000, 475484093140888000, 14390912055770276000, 212715123602601932000
Offset: 0

Views

Author

Alois P. Heinz, May 01 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) = 5: (123), (132), (12)(3), (13)(2), (1)(23).
a(4) = 8: (1234), (1243), (1324), (1342), (1423), (1432), (1)(23)(4), (1)(24)(3).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, 1, add(`if`((i+t)::odd,
          b(n-i, 1-t)*(i-1)!*binomial(n-1, i-1), 0), i=1..n))
        end:
    a:= n-> `if`(n=0, 1, b(n, 0)+b(n, 1)):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, t_] := b[n, t] = If[n == 0, 1, Sum[If[(i + t) // OddQ, b[n - i, 1 - t]*(i - 1)!*Binomial[n - 1, i - 1], 0], {i, 1, n}]];
    a[n_] := If[n == 0, 1, b[n, 0] + b[n, 1]];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 28 2018, from Maple *)

A286077 Number of permutations of [n] with a strongly unimodal cycle size list.

Original entry on oeis.org

1, 1, 1, 5, 16, 80, 468, 3220, 24436, 218032, 2114244, 22759788, 267150264, 3413938512, 46668380592, 690881123856, 10841100147072, 181434400544160, 3215124610986240, 60280035304993920, 1186176116251848960, 24624604679704053120, 534223121657911528320
Offset: 0

Views

Author

Alois P. Heinz, May 01 2017

Keywords

Comments

Each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements.
Strongly unimodal means strictly increasing then strictly decreasing.

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(t=0 and n>i*(i-1)/2, 0,
          `if`(n=0, 1, add(b(n-j, j, 0)*binomial(n-1, j-1)*
          (j-1)!, j=1..min(n, i-1))+`if`(t=1, add(b(n-j, j, 1)*
           binomial(n-1, j-1)*(j-1)!, j=i+1..n), 0)))
        end:
    a:= n-> b(n, 0, 1):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[t == 0 && n > i*(i-1)/2, 0, If[n == 0, 1, Sum[b[n-j, j, 0]*Binomial[n-1, j-1]*(j-1)!, {j, 1, Min[n, i-1]}] + If[t == 1, Sum[b[n-j, j, 1]*Binomial[n-1, j-1]*(j-1)!, {j, i+1, n}], 0]]];
    a[n_] := b[n, 0, 1];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 28 2018, from Maple *)
Showing 1-7 of 7 results.