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

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

A175716 The total number of elements(ordered pairs) in all equivalence relations on {1,2,...,n}.

Original entry on oeis.org

0, 1, 6, 27, 120, 560, 2778, 14665, 82232, 488403, 3062980, 20221520, 140134404, 1016698813, 7703878042, 60833235795, 499592325152, 4259301450652, 37634032670886, 344092369602461, 3250925202629100
Offset: 0

Author

Geoffrey Critzer, Dec 04 2010

Keywords

Examples

			a(2) = 6 because the equivalence relations on {1,2}: {(1,1), (2,2)}, {(1,1), (2,2), (1,2), (2,1)} contain 6 ordered pairs.
		

Crossrefs

Programs

  • Mathematica
    f[list_] := Length[list]^2; Table[Total[Map[f, Level[SetParttions[n], {2}]]], {n, 0, 12}] (* or *)
    Range[0,20]! CoefficientList[Series[(x + x^2)Exp[x] * Exp[Exp[x] - 1], {x, 0, 20}], x]

Formula

a(n) = n*A124427(n). - Joerg Arndt, Dec 04 2010
E.g.f.: (x+x^2) * exp(x) * exp(exp(x)-1).
Showing 1-5 of 5 results.