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.

A275313 Number of set partitions of [n] where adjacent blocks differ in size.

Original entry on oeis.org

1, 1, 1, 4, 7, 23, 100, 333, 1443, 6910, 36035, 186958, 1095251, 6620976, 42151463, 290483173, 2030271491, 15044953241, 116044969497, 930056879535, 7749440529803, 66931578540965, 597728811956244, 5511695171795434, 52578231393128128, 515775207055816041
Offset: 0

Views

Author

Alois P. Heinz, Jul 22 2016

Keywords

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) = 23: 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, 1|234|5, 1|235|4, 14|2|35, 1|245|3, 15|2|34.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, add(`if`(i=j, 0,
          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..35);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, Sum[If[i==j, 0, 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, 35}] (* Jean-François Alcover, Dec 18 2016, after Alois P. Heinz *)

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

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

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 *)
Showing 1-7 of 7 results.