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-10 of 12 results. Next

A270701 Total sum T(n,k) of the sizes of all blocks with maximal element k in all set partitions of {1,2,...,n}; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 3, 2, 4, 9, 5, 9, 16, 30, 15, 25, 41, 67, 112, 52, 82, 127, 195, 299, 463, 203, 307, 456, 670, 979, 1429, 2095, 877, 1283, 1845, 2623, 3702, 5204, 7307, 10279, 4140, 5894, 8257, 11437, 15717, 21485, 29278, 39848, 54267, 21147, 29427, 40338, 54692, 73561, 98367, 131007, 174029, 230884, 306298
Offset: 1

Views

Author

Alois P. Heinz, Mar 21 2016

Keywords

Examples

			Row n=3 is [2, 4, 9] = [0+0+0+1+1, 0+2+1+0+1, 3+1+2+2+1] because the set partitions of {1,2,3} are: 123, 12|3, 13|2, 1|23, 1|2|3.
Triangle T(n,k) begins:
:     1;
:     1,    3;
:     2,    4,    9;
:     5,    9,   16,    30;
:    15,   25,   41,    67,   112;
:    52,   82,  127,   195,   299,   463;
:   203,  307,  456,   670,   979,  1429,  2095;
:   877, 1283, 1845,  2623,  3702,  5204,  7307, 10279;
:  4140, 5894, 8257, 11437, 15717, 21485, 29278, 39848, 54267;
		

Crossrefs

Main and lower diagonals give: A124427, A270765, A270766, A270767, A270768, A270769, A270770, A270771, A270772, A270773.
Row sums give A070071.
Reflected triangle gives A270702.
T(2n-1,n) gives A270703.

Programs

  • Maple
    b:= proc(n, m, t) option remember; `if`(n=0, [1, 0], add(
         `if`(t=1 and j<>m+1, 0, (p->p+`if`(j=-t or t=1 and j=m+1,
          [0, p[1]], 0))(b(n-1, max(m, j), `if`(t=1 and j=m+1, -j,
         `if`(t<0, t, `if`(t>0, t-1, 0)))))), j=1..m+1))
        end:
    T:= (n, k)-> b(n, 0, max(0, 1+n-k))[2]:
    seq(seq(T(n, k), k=1..n), n=1..12);
  • Mathematica
    b[n_, m_, t_] := b[n, m, t] = If[n == 0, {1, 0}, Sum[If[t == 1 && j != m+1, 0, Function[p, p + If[j == -t || t == 1 && j == m+1, {0, p[[1]]}, 0]][b[ n-1, Max[m, j], If[t == 1 && j == m+1, -j, If[t < 0, t, If[t > 0, t-1, 0] ]]]]], {j, 1, m+1}]];
    T[n_, k_] := b[n, 0, Max[0, 1+n-k]][[2]];
    Table[Table[T[n, k], {k, 1, n}], {n, 1, 12}] // Flatten (* Jean-François Alcover, Apr 24 2016, translated from Maple *)

Formula

T(n,k) = A270702(n,n-k+1).

A270702 Total sum T(n,k) of the sizes of all blocks with minimal element k in all set partitions of {1,2,...,n}; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 3, 1, 9, 4, 2, 30, 16, 9, 5, 112, 67, 41, 25, 15, 463, 299, 195, 127, 82, 52, 2095, 1429, 979, 670, 456, 307, 203, 10279, 7307, 5204, 3702, 2623, 1845, 1283, 877, 54267, 39848, 29278, 21485, 15717, 11437, 8257, 5894, 4140, 306298, 230884, 174029, 131007, 98367, 73561, 54692, 40338, 29427, 21147
Offset: 1

Views

Author

Alois P. Heinz, Mar 21 2016

Keywords

Examples

			Row n=3 is [9, 4, 2] = [3+2+2+1+1, 0+0+1+2+1, 0+1+0+0+1] because the set partitions of {1,2,3} are: 123, 12|3, 13|2, 1|23, 1|2|3.
Triangle T(n,k) begins:
:      1;
:      3,     1;
:      9,     4,     2;
:     30,    16,     9,     5;
:    112,    67,    41,    25,    15;
:    463,   299,   195,   127,    82,    52;
:   2095,  1429,   979,   670,   456,   307,  203;
:  10279,  7307,  5204,  3702,  2623,  1845, 1283,  877;
:  54267, 39848, 29278, 21485, 15717, 11437, 8257, 5894, 4140;
		

Crossrefs

Main and lower diagonals give: A000110(n-1), A270756, A270757, A270758, A270759, A270760, A270761, A270762, A270763, A270764.
Row sums give A070071.
Reflected triangle gives A270701.
T(2n-1,n) gives A270703.

Programs

  • Maple
    b:= proc(n, m, t) option remember; `if`(n=0, [1, 0], add(
         `if`(t=1 and j<>m+1, 0, (p->p+`if`(j=-t or t=1 and j=m+1,
          [0, p[1]], 0))(b(n-1, max(m, j), `if`(t=1 and j=m+1, -j,
         `if`(t<0, t, `if`(t>0, t-1, 0)))))), j=1..m+1))
        end:
    T:= (n, k)-> b(n, 0, k)[2]:
    seq(seq(T(n, k), k=1..n), n=1..12);
  • Mathematica
    b[n_, m_, t_] := b[n, m, t] = If[n == 0, {1, 0}, Sum[If[t == 1 && j != m + 1, 0, Function[p, p + If[j == -t || t == 1 && j == m + 1, {0, p[[1]]}, 0] ][b[n - 1, Max[m, j], If[t == 1 && j == m + 1, -j, If[t < 0, t, If[t > 0, t - 1, 0]]]]]], {j, 1, m + 1}]];
    T[n_, k_] := b[n, 0, k][[2]];
    Table[Table[T[n, k], {k, 1, n}], {n, 1, 12}] // Flatten (* Jean-François Alcover, Apr 24 2016, translated from Maple *)

Formula

T(n,k) = A270701(n,n-k+1).

A270236 Triangle T(n,p) read by rows: the number of occurrences of p in the restricted growth functions of length n.

Original entry on oeis.org

1, 3, 1, 9, 5, 1, 30, 21, 8, 1, 112, 88, 47, 12, 1, 463, 387, 253, 97, 17, 1, 2095, 1816, 1345, 675, 184, 23, 1, 10279, 9123, 7304, 4418, 1641, 324, 30, 1, 54267, 48971, 41193, 28396, 13276, 3645, 536, 38, 1, 306298, 279855, 243152, 183615, 102244, 36223, 7473, 842, 47, 1
Offset: 1

Views

Author

R. J. Mathar, Mar 13 2016

Keywords

Comments

The RG functions used here are defined by f(1)=1, f(j) <= 1+max_{i
T(n,p) is the number of elements in the p-th subset in all set partitions of [n]. - Joerg Arndt, Mar 14 2016

Examples

			The two restricted growth functions of length 2 are (1,1) and (1,2). The 1 appears 3 times and the 2 once, so T(2,1)=3 and T(2,2)=1.
1;
3,1;
9,5,1;
30,21,8,1;
112,88,47,12,1;
463,387,253,97,17,1;
2095,1816,1345,675,184,23,1;
10279,9123,7304,4418,1641,324,30,1;
54267,48971,41193,28396,13276,3645,536,38,1;
306298,279855,243152,183615,102244,36223,7473,842,47,1;
1838320,1695902,1506521,1211936,770989,334751,90223,14303,1267,57,1;
11677867,10856879,9799547,8237223,5795889,2965654,995191,207186,25820, 1839,68,1;
		

Crossrefs

Cf. A070071 (row sums).
T(2n+1,n+1) gives A270529.

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, [1, 0], add((p->
          [p[1], p[2]+p[1]*x^j])(b(n-1, max(m, j))), j=1..m+1))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n, 0)[2]):
    seq(T(n), n=0..12);  # Alois P. Heinz, Mar 14 2016
  • Mathematica
    b[n_, m_] := b[n, m] = If[n == 0, {1, 0}, Sum[Function[p, {p[[1]], p[[2]] + p[[1]]*x^j}][b[n-1, Max[m, j]]], {j, 1, m+1}]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, n}]][b[n, 0][[2]] ]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Apr 07 2016, after Alois P. Heinz *)

Formula

T(n,n) = 1.
Conjecture: T(n,n-1) = 2+n*(n-1)/2 for n>1.
Conjecture: T(n+1,n-1) = 2+n*(n+1)*(3*n^2-5*n+26)/24 for n>1.
Sum_{k=1..n} k * T(n,k) = A346772(n). - Alois P. Heinz, Aug 03 2021

A283424 Number T(n,k) of blocks of size >= k in all set partitions of [n], assuming that every set partition contains one block of size zero; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 2, 1, 5, 3, 1, 15, 10, 4, 1, 52, 37, 17, 5, 1, 203, 151, 76, 26, 6, 1, 877, 674, 362, 137, 37, 7, 1, 4140, 3263, 1842, 750, 225, 50, 8, 1, 21147, 17007, 9991, 4307, 1395, 345, 65, 9, 1, 115975, 94828, 57568, 25996, 8944, 2392, 502, 82, 10, 1
Offset: 0

Author

Alois P. Heinz, May 14 2017

Keywords

Comments

T(n,k) is defined for all n,k >= 0. The triangle contains only the terms with k<=n. T(n,k) = 0 for k>n.

Examples

			T(3,2) = 4 because the number of blocks of size >= 2 in all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 1+1+1+1+0 = 4.
Triangle T(n,k) begins:
      1;
      2,     1;
      5,     3,    1;
     15,    10,    4,    1;
     52,    37,   17,    5,    1;
    203,   151,   76,   26,    6,   1;
    877,   674,  362,  137,   37,   7,  1;
   4140,  3263, 1842,  750,  225,  50,  8, 1;
  21147, 17007, 9991, 4307, 1395, 345, 65, 9, 1;
  ...
		

Crossrefs

Columns k=0-10 give: A000110(n+1), A138378 or A005493(n-1), A124325, A288785, A288786, A288787, A288788, A288789, A288790, A288791, A288792.
Row sums give A124427(n+1).
T(2n,n) gives A286896.

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(k>n, 0,
          binomial(n, k)*combinat[bell](n-k)+T(n, k+1))
        end:
    seq(seq(T(n, k), k=0..n), n=0..14);
  • Mathematica
    T[n_, k_] := Sum[Binomial[n, j]*BellB[j], {j, 0, n - k}];
    Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 30 2018 *)

Formula

T(n,k) = Sum_{j=0..n-k} binomial(n,j) * Bell(j).
T(n,k) = Bell(n+1) - Sum_{j=0..k-1} binomial(n,j) * Bell(n-j).
T(n,k) = Sum_{j=k..n} A056857(n+1,j) = Sum_{j=k..n} A056860(n+1,n+1-j).
Sum_{k=0..n} T(n,k) = n*Bell(n)+Bell(n+1) = A124427(n+1).
Sum_{k=1..n} T(n,k) = n*Bell(n) = A070071(n).
T(n,0)-T(n,1) = Bell(n).
Sum_{k=0..n} (-1)^k * T(n,k) = A224271(n+1). - Alois P. Heinz, May 17 2023

A319298 Number T(n,k) of entries in the k-th blocks of all set partitions of [n] when blocks are ordered by increasing lengths (and increasing smallest elements); triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 3, 1, 7, 7, 1, 21, 25, 13, 1, 66, 101, 71, 21, 1, 258, 366, 396, 166, 31, 1, 1079, 1555, 1877, 1247, 337, 43, 1, 4987, 7099, 9199, 7855, 3305, 617, 57, 1, 25195, 34627, 47371, 47245, 27085, 7681, 1045, 73, 1, 136723, 184033, 253108, 284968, 203278, 79756, 16126, 1666, 91, 1
Offset: 1

Author

Alois P. Heinz, Dec 07 2018

Keywords

Examples

			The 5 set partitions of {1,2,3} are:
  1   |2  |3
  1   |23
  2   |13
  3   |12
  123
so there are 7 elements in the first (smallest) blocks, 7 in the second blocks and only 1 in the third blocks.
Triangle T(n,k) begins:
      1;
      3,     1;
      7,     7,     1;
     21,    25,    13,     1;
     66,   101,    71,    21,     1;
    258,   366,   396,   166,    31,    1;
   1079,  1555,  1877,  1247,   337,   43,    1;
   4987,  7099,  9199,  7855,  3305,  617,   57,  1;
  25195, 34627, 47371, 47245, 27085, 7681, 1045, 73, 1;
  ...
		

Crossrefs

Row sums give A070071.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, add(l[i]*
          x^i, i=1..nops(l)), add(binomial(n-1, j-1)*
          b(n-j, sort([l[], j])), j=1..n))
        end:
    T:= n-> (p-> (seq(coeff(p, x, i), i=1..n)))(b(n, [])):
    seq(T(n), n=1..12);
    # second Maple program:
    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))(b(n-i*j, i+1,
          max(0, t-j))/j!*combinat[multinomial](n, i$j, n-i*j)), j=0..n/i)))
        end:
    T:= (n, k)-> b(n, 1, k)[2]:
    seq(seq(T(n, k), k=1..n), n=1..12);  # Alois P. Heinz, Mar 02 2020
  • Mathematica
    b[n_, l_] := b[n, l] = If[n == 0, Sum[l[[i]] x^i, {i, 1, Length[l]}], Sum[ Binomial[n-1, j-1] b[n-j, Sort[Append[l, j]]], {j, 1, n}]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, n}]][b[n, {}]];
    Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Dec 28 2018, after Alois P. Heinz *)

A319375 Number T(n,k) of entries in the k-th blocks of all set partitions of [n] when blocks are ordered by decreasing lengths (and increasing smallest elements); triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 3, 1, 10, 4, 1, 35, 17, 7, 1, 136, 76, 36, 11, 1, 577, 357, 186, 81, 16, 1, 2682, 1737, 1023, 512, 162, 22, 1, 13435, 8997, 5867, 3151, 1345, 295, 29, 1, 72310, 49420, 34744, 20071, 10096, 3145, 499, 37, 1, 414761, 289253, 211888, 133853, 72973, 29503, 6676, 796, 46, 1
Offset: 1

Author

Alois P. Heinz, Dec 07 2018

Keywords

Examples

			The 5 set partitions of {1,2,3} are:
  1   |2  |3
  12  |3
  13  |2
  23  |1
  123
so there are 10 elements in the first (largest) blocks, 4 in the second blocks and only 1 in the third blocks.
Triangle T(n,k) begins:
      1;
      3,     1;
     10,     4,     1;
     35,    17,     7,     1;
    136,    76,    36,    11,     1;
    577,   357,   186,    81,    16,    1;
   2682,  1737,  1023,   512,   162,   22,   1;
  13435,  8997,  5867,  3151,  1345,  295,  29,  1;
  72310, 49420, 34744, 20071, 10096, 3145, 499, 37, 1;
  ...
		

Crossrefs

Row sums give A070071.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, add(l[-i]*
          x^i, i=1..nops(l)), add(binomial(n-1, j-1)*
          b(n-j, sort([l[], j])), j=1..n))
        end:
    T:= n-> (p-> (seq(coeff(p, x, i), i=1..n)))(b(n, [])):
    seq(T(n), n=1..12);
    # second Maple program:
    b:= proc(n, i, t) option remember; `if`(n=0, [1, 0], `if`(i<1, 0,
          add((p-> p+`if`(t>0 and t-j<1, [0, p[1]*i], 0))(
           combinat[multinomial](n, i$j, n-i*j)/j!*
          b(n-i*j, min(n-i*j, i-1), max(0, t-j))), j=0..n/i)))
        end:
    T:= (n, k)-> b(n$2, k)[2]:
    seq(seq(T(n, k), k=1..n), n=1..12);  # Alois P. Heinz, Mar 02 2020
  • Mathematica
    b[n_, l_] := b[n, l] = If[n == 0, Sum[l[[-i]] x^i, {i, 1, Length[l]}], Sum[ Binomial[n-1, j-1] b[n-j, Sort[Append[l, j]]], {j, 1, n}]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, n}]][b[n, {}]];
    Array[T, 12] // Flatten (* Jean-François Alcover, Dec 28 2018, after Alois P. Heinz *)

A286416 Number T(n,k) of entries in the k-th last blocks of all set partitions of [n]; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 3, 1, 8, 6, 1, 24, 25, 10, 1, 83, 98, 63, 15, 1, 324, 399, 338, 135, 21, 1, 1400, 1746, 1727, 980, 257, 28, 1, 6609, 8271, 8874, 6426, 2455, 448, 36, 1, 33758, 42284, 47191, 40334, 20506, 5474, 730, 45, 1, 185136, 231939, 263458, 250839, 158827, 57239, 11128, 1128, 55, 1
Offset: 1

Author

Alois P. Heinz, May 08 2017

Keywords

Examples

			T(3,2) = 6 because the number of entries in the second last blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 0+2+2+1+1 = 6.
Triangle T(n,k) begins:
     1;
     3,    1;
     8,    6,    1;
    24,   25,   10,    1;
    83,   98,   63,   15,    1;
   324,  399,  338,  135,   21,   1;
  1400, 1746, 1727,  980,  257,  28,  1;
  6609, 8271, 8874, 6426, 2455, 448, 36, 1;
  ...
		

Crossrefs

Columns k=1-2 give: A038561 (for n>1), A286433.
Main diagonal and first lower diagonal give: A000012, A000217.
Row sums give A070071.

A175757 Triangular array read by rows: T(n,k) is the number of blocks of size k in all set partitions of {1,2,...,n}.

Original entry on oeis.org

1, 2, 1, 6, 3, 1, 20, 12, 4, 1, 75, 50, 20, 5, 1, 312, 225, 100, 30, 6, 1, 1421, 1092, 525, 175, 42, 7, 1, 7016, 5684, 2912, 1050, 280, 56, 8, 1, 37260, 31572, 17052, 6552, 1890, 420, 72, 9, 1, 211470, 186300, 105240, 42630, 13104, 3150, 600, 90, 10, 1
Offset: 1

Author

Geoffrey Critzer, Dec 04 2010

Keywords

Comments

The row sums of this triangle equal A005493. Equals A056857 without its leftmost column.
T(n,k) = binomial(n,k)*B(n-k) where B is the Bell number.

Examples

			The set {1,2,3} has 5 partitions, {{1, 2, 3}}, {{2, 3}, {1}}, {{1, 3}, {2}}, {{1, 2}, {3}}, and {{2}, {3}, {1}}, and there are a total of 3 blocks of size 2, so T(3,2)=3.
Triangle begins:
    1;
    2,   1;
    6,   3,   1;
   20,  12,   4,  1;
   75,  50,  20,  5, 1;
  312, 225, 100, 30, 6, 1;
  ...
		

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, [1, 0],
          add((p-> p+[0, p[1]*x^j])(b(n-j)*
          binomial(n-1, j-1)), j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n)[2]):
    seq(T(n), n=1..12);  # Alois P. Heinz, Apr 24 2017
  • Mathematica
    Table[Table[Length[Select[Level[SetPartitions[m],{2}],Length[#]==n&]],{n,1,m}],{m,1,10}]//Grid

Formula

E.g.f. for column k is x^k/k!*exp(exp(x)-1).
Sum_{k=1..n} k * T(n,k) = A070071(n). - Alois P. Heinz, Mar 03 2020

A346772 Total sum of block indices of the elements over all partitions of [n].

Original entry on oeis.org

0, 1, 5, 22, 100, 482, 2475, 13527, 78476, 481687, 3117962, 21218851, 151387882, 1129430737, 8790433999, 71222812912, 599577147056, 5235054113412, 47331036294905, 442462325254995, 4270909302907430, 42514043248222709, 435920900603529954, 4599155199953703373
Offset: 0

Author

Alois P. Heinz, Aug 02 2021

Keywords

Examples

			a(3) = 22 = 3 + 4 + 4 + 5 + 6, summing block indices 111, 112, 121, 122, 123 of the 5 partitions of [3]: 123, 12|3, 13|2, 1|23, 1|2|3.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, [1, 0], add(
         (p-> p+[0, p[1]*j])(b(n-1, max(m, j))), j=1..m+1))
        end:
    a:= n-> b(n, 0)[2]:
    seq(a(n), n=0..25);
  • Mathematica
    b[n_, m_] := b[n, m] = If[n == 0, {1, 0}, Sum[
         Function[p, p+{0, p[[1]]*j}][b[n-1, Max[m, j]]], {j, 1, m+1}]];
    a[n_] := b[n, 0][[2]];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 27 2022, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=1..n} A120057(n,k).
a(n) = Sum_{k=0..n*(n-1)/2} (n+k) * A126347(n,k).
a(n) = Sum_{k=1..n} k * A270236(n,k).

A350175 Sum of the distinct block sizes over all partitions of [n].

Original entry on oeis.org

0, 1, 3, 13, 45, 196, 888, 4383, 22879, 129163, 768913, 4849912, 32202712, 224672241, 1640679589, 12517008985, 99484656169, 822410210044, 7055883373604, 62730142658947, 576984726864147, 5482889832932123, 53757450049841167, 543169144098559606, 5649499728403949184
Offset: 0

Author

Alois P. Heinz, Jan 06 2022

Keywords

Examples

			a(3) = 13 = 1*3 + 3*(1+2) + 1: 123, 1|23, 13|2, 12|3, 1|2|3.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, c) option remember; `if`(n=0, c,
          `if`(i<1, 0, add(b(n-j*i, i-1, c+i*signum(j))*
          combinat[multinomial](n, n-i*j, i$j)/j!, j=0..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..30);
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!);
    b[n_, i_, c_] := b[n, i, c] = If[n == 0, c,
         If[i < 1, 0, Sum[b[n - j*i, i - 1, c + i*Sign[j]]*
         multinomial[n, Join[{n - i*j}, Table[i, {j}]]]/j!, {j, 0, n/i}]]];
    a[n_] := b[n, n, 0];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 11 2022, after Alois P. Heinz *)

Formula

a(n) mod 2 = A131719(n).
Showing 1-10 of 12 results. Next