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

A275309 Number of set partitions of [n] with decreasing block sizes.

Original entry on oeis.org

1, 1, 1, 3, 4, 11, 36, 82, 239, 821, 3742, 10328, 42934, 156070, 729249, 4025361, 15032099, 68746675, 334541624, 1645575386, 9104991312, 65010298257, 282768687257, 1616844660914, 8660050947383, 53262316928024, 309119883729116, 2185141720645817
Offset: 0

Views

Author

Alois P. Heinz, Jul 22 2016

Keywords

Examples

			a(3) = 3: 123, 12|3, 13|2.
a(4) = 4: 1234, 123|4, 124|3, 134|2.
a(5) = 11: 12345, 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 1345|2, 134|25, 135|24, 145|23.
		

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)*binomial(n-1, i-1))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..35);
  • 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]*Binomial[n - 1, i - 1]]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jan 21 2017, translated from Maple *)

A275310 Number of set partitions of [n] with nonincreasing block sizes.

Original entry on oeis.org

1, 1, 2, 4, 11, 30, 102, 346, 1353, 5444, 24170, 110082, 546075, 2777828, 15099359, 84491723, 499665713, 3035284304, 19375261490, 126821116410, 866293979945, 6072753348997, 44193947169228, 329387416656794, 2542173092336648, 20069525888319293
Offset: 0

Views

Author

Alois P. Heinz, Jul 22 2016

Keywords

Examples

			a(3) = 4: 123, 12|3, 13|2, 1|2|3.
a(4) = 11: 1234, 123|4, 124|3, 12|34, 12|3|4, 134|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(
          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..35);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, Sum[b[n-j, j]*Binomial[n-1, j-1], {j, 1, Min[n, i]}]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Feb 02 2017, translated from Maple *)

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 *)

A275312 Number of set partitions of [n] with increasing block sizes.

Original entry on oeis.org

1, 1, 1, 2, 2, 6, 11, 28, 51, 242, 532, 1545, 6188, 16592, 86940, 302909, 967523, 3808673, 23029861, 71772352, 484629531, 1840886853, 9376324526, 37878035106, 204542429832, 1458360522892, 6241489795503, 45783932444672, 211848342780210, 1137580874772724
Offset: 0

Views

Author

Alois P. Heinz, Jul 22 2016

Keywords

Examples

			a(4) = 2: 1234, 1|234.
a(5) = 6: 12345, 12|345, 13|245, 14|235, 15|234, 1|2345.
a(6) = 11: 123456, 12|3456, 13|2456, 14|2356, 15|2346, 16|2345, 1|23456, 1|23|456, 1|24|356, 1|25|346, 1|26|345.
		

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)*binomial(n-1, i-1)))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i > n, 0, b[n, i+1] + b[n-i, i+1] * Binomial[n-1, i-1]]]; a[n_] := b[n, 1]; Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jan 22 2017, 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 *)

A275679 Number of set partitions of [n] with alternating block size parities.

Original entry on oeis.org

1, 1, 1, 4, 3, 20, 43, 136, 711, 1606, 12653, 36852, 250673, 1212498, 6016715, 45081688, 196537387, 1789229594, 8963510621, 76863454428, 512264745473, 3744799424978, 32870550965259, 219159966518160, 2257073412153459, 15778075163815474, 165231652982941085
Offset: 0

Views

Author

Alois P. Heinz, Aug 05 2016

Keywords

Examples

			a(3) = 4: 123, 12|3, 13|2, 1|23.
a(4) = 3: 1234, 1|23|4, 1|24|3.
a(5) = 20: 12345, 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 12|345, 12|3|45, 1345|2, 134|25, 135|24, 13|245, 13|2|45, 145|23, 14|235, 15|234, 1|2345, 14|2|35, 15|2|34.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, 1, add(
          `if`((i+t)::odd, b(n-i, 1-t)*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..35);
  • Mathematica
    b[n_, t_] := b[n, t] = If[n==0, 1, Sum[If[OddQ[i+t], b[n-i, 1-t] * 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, 35}] (* Jean-François Alcover, Feb 27 2017, translated from Maple *)

A275389 Number of set partitions of [n] with a strongly unimodal block size list.

Original entry on oeis.org

1, 1, 1, 4, 7, 19, 71, 219, 759, 2697, 12395, 47477, 231950, 1040116, 4851742, 26690821, 131478031, 736418510, 4262619682, 24680045903, 145629814329, 935900941506, 5778263418232, 37626913475878, 257550263109475, 1782180357952449, 12526035635331581
Offset: 0

Views

Author

Alois P. Heinz, Jul 26 2016

Keywords

Comments

Strongly unimodal means strictly increasing then strictly decreasing.

Examples

			a(3) = 4: 123, 12|3, 13|2, 1|23.
a(4) = 7: 1234, 123|4, 124|3, 134|2, 1|234, 1|23|4, 1|24|3.
a(5) = 19: 12345, 1234|5, 1235|4, 123|45, 1245|3, 124|35, 125|34, 12|345, 1345|2, 134|25, 135|24, 13|245, 145|23, 14|235, 15|234, 1|2345, 1|234|5, 1|235|4, 1|245|3.
		

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..min(n, i-1))
         +`if`(t=1, add(b(n-j, j, 1)*binomial(n-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, Min[n, i-1]}] + If[t==1, Sum[b[n-j, j, 1]*Binomial[n-1, j-1], {j, i+1, n}], 0]]]; a[n_] := b[n, 0, 1]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 07 2017, translated from Maple *)

A280275 Number of set partitions of [n] where sizes of distinct blocks are coprime.

Original entry on oeis.org

1, 1, 2, 5, 12, 37, 118, 387, 1312, 4445, 17034, 73339, 342532, 1616721, 7299100, 31195418, 129179184, 578924785, 3057167242, 18723356715, 120613872016, 738703713245, 4080301444740, 20353638923275, 95273007634552, 443132388701107, 2149933834972928
Offset: 0

Views

Author

Alois P. Heinz, Dec 30 2016

Keywords

Examples

			a(n) = A000110(n) for n<=3.
a(4) = 12: 1234, 123|4, 124|3, 12|3|4, 134|2, 13|2|4, 1|234, 1|23|4, 14|2|3, 1|24|3, 1|2|34, 1|2|3|4.
a(5) = 37: 12345, 1234|5, 1235|4, 123|45, 123|4|5, 1245|3, 124|35, 124|3|5, 125|34, 12|345, 125|3|4, 12|3|4|5, 1345|2, 134|25, 134|2|5, 135|24, 13|245, 135|2|4, 13|2|4|5, 145|23, 14|235, 15|234, 1|2345, 1|234|5, 1|235|4, 1|23|4|5, 145|2|3, 14|2|3|5, 1|245|3, 1|24|3|5, 1|2|345, 1|2|34|5, 15|2|3|4, 1|25|3|4, 1|2|35|4, 1|2|3|45, 1|2|3|4|5.
		

Crossrefs

Row sums of A280880.

Programs

  • Maple
    with(numtheory):
    b:= proc(n, i, s) option remember;
          `if`(n=0 or i=1, 1, b(n, i-1, select(x->x<=i-1, s))+
          `if`(i>n or factorset(i) intersect s<>{}, 0, b(n-i, i-1,
          select(x->x<=i-1, s union factorset(i)))*binomial(n, i)))
        end:
    a:= n-> b(n$2, {}):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, i_, s_] := b[n, i, s] = Expand[If[n==0 || i==1, x^n, b[n, i-1, Select[s, # <= i-1&]] + If[i>n || FactorInteger[i][[All, 1]] ~Intersection~ s != {}, 0, x*b[n-i, i-1, Select[s ~Union~ FactorInteger[i][[All, 1]], # <= i-1&]]*Binomial[n, i]]]];
    a[n_] := b[n, n, {}] // CoefficientList[#, x]& // Total;
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 23 2017, translated from Maple *)

Formula

a(n) = Sum_{k=0..n} A280880(n,k).
Showing 1-8 of 8 results.