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

A271424 Number T(n,k) of set partitions of [n] with minimal block length multiplicity equal to k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 4, 0, 1, 0, 11, 3, 0, 1, 0, 51, 0, 0, 0, 1, 0, 132, 55, 15, 0, 0, 1, 0, 771, 105, 0, 0, 0, 0, 1, 0, 3089, 945, 0, 105, 0, 0, 0, 1, 0, 18388, 1218, 1540, 0, 0, 0, 0, 0, 1, 0, 96423, 15456, 3150, 0, 945, 0, 0, 0, 0, 1, 0, 627529, 26785, 24255, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Apr 07 2016

Keywords

Comments

At least one block length occurs exactly k times, and all block lengths occur at least k times.

Examples

			T(4,1) = 11: 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.
T(4,2) = 3: 12|34, 13|24, 14|23.
T(4,4) = 1: 1|2|3|4.
T(6,3) = 15: 12|34|56, 12|35|46, 12|36|45, 13|24|56, 13|25|46, 13|26|45, 14|23|56, 15|23|46, 16|23|45, 14|25|36, 14|26|35, 15|24|36, 16|24|35, 15|26|34, 16|25|34.
Triangle T(n,k) begins:
  1;
  0,     1;
  0,     1,     1;
  0,     4,     0,    1;
  0,    11,     3,    0,   1;
  0,    51,     0,    0,   0,   1;
  0,   132,    55,   15,   0,   0, 1;
  0,   771,   105,    0,   0,   0, 0, 1;
  0,  3089,   945,    0, 105,   0, 0, 0, 1;
  0, 18388,  1218, 1540,   0,   0, 0, 0, 0, 1;
  0, 96423, 15456, 3150,   0, 945, 0, 0, 0, 0, 1;
		

Crossrefs

Row sums give A000110.
Main diagonal gives A000012.
T(2n,n) gives A001147.
T(3n,n) gives A271715.
Cf. A271423.

Programs

  • Maple
    with(combinat):
    b:= proc(n, i, k) option remember; `if`(n=0, 1,
          `if`(i<1, 0, add(multinomial(n, n-i*j, i$j)
            *b(n-i*j, i-1, k)/j!, j={0, $k..n/i})))
        end:
    T:= (n, k)-> b(n$2, k)-`if`(n=k,0,b(n$2, k+1)):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i<1, 0, Sum[multinomial[n, Join[{n-i*j}, Array[i&, j]]]* b[n-i*j, i-1, k]/j!, {j, Join[{0}, Range[k, n/i]] // Union}]]]; T[n_, k_] := b[n, n, k] - If[n == k, 0, b[n, n, k + 1]]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 16 2017, adapted from Maple *)

A318120 Number of set partitions of {1,...,n} with relatively prime block sizes.

Original entry on oeis.org

1, 1, 1, 4, 11, 51, 162, 876, 3761, 20782, 109293, 678569, 4038388, 27644436, 186524145, 1379760895, 10323844183, 82864869803, 674798169662, 5832742205056, 51385856585637, 474708148273586, 4486977535287371, 44152005855084345, 444577220573083896
Offset: 0

Views

Author

Gus Wiseman, Dec 16 2018

Keywords

Examples

			The a(4) = 11 set partitions:
  {{1},{2},{3},{4}}
   {{1},{2},{3,4}}
   {{1},{2,3},{4}}
   {{1},{2,4},{3}}
   {{1,2},{3},{4}}
   {{1,3},{2},{4}}
   {{1,4},{2},{3}}
    {{1},{2,3,4}}
    {{1,2,3},{4}}
    {{1,2,4},{3}}
    {{1,3,4},{2}}
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, `if`(t<2, 1, 0),
          add(b(n-j, igcd(t, j))*binomial(n-1, j-1), j=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..25);  # Alois P. Heinz, Dec 30 2019
  • Mathematica
    numSetPtnsOfType[ptn_]:=Total[ptn]!/Times@@Factorial/@ptn/Times@@Factorial/@Length/@Split[ptn];
    Table[Total[numSetPtnsOfType/@Select[IntegerPartitions[n],GCD@@#==1&]],{n,10}]
    (* Second program: *)
    b[n_, t_] := b[n, t] = If[n == 0, If[t < 2, 1, 0],
         Sum[b[n - j, GCD[t, j]]*Binomial[n - 1, j - 1], {j, 1, n}]];
    a[n_] := b[n, 0];
    a /@ Range[0, 25] (* Jean-François Alcover, May 10 2021, after Alois P. Heinz *)

Formula

a(n) = Sum_{|y| = n, GCD(y) = 1} n! / (Product_i y_i! * Product_i (y)_i!) where the sum is over all relatively prime integer partitions of n and (y)_i is the multiplicity of i in y.
Showing 1-2 of 2 results.