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.

A124324 Triangle read by rows: T(n,k) is the number of partitions of an n-set having k blocks of size > 1 (0<=k<=floor(n/2)).

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 1, 11, 3, 1, 26, 25, 1, 57, 130, 15, 1, 120, 546, 210, 1, 247, 2037, 1750, 105, 1, 502, 7071, 11368, 2205, 1, 1013, 23436, 63805, 26775, 945, 1, 2036, 75328, 325930, 247555, 27720, 1, 4083, 237127, 1561516, 1939630, 460845, 10395, 1, 8178
Offset: 0

Views

Author

Emeric Deutsch, Oct 28 2006

Keywords

Comments

Row sums are the Bell numbers (A000110).
It appears that the triangles in this sequence and A112493 have identical columns, except for shifts. - Jörgen Backelin, Jun 20 2022
Equivalent to Jörgen Backelin's observation, the rows of A112493 may be read off as the diagonals of this entry. - Tom Copeland, Sep 24 2022

Examples

			T(4,2) = 3 because we have 12|34, 13|24 and 14|23 (if we take {1,2,3,4} as our 4-set).
Triangle starts:
  1;
  1;
  1,    1;
  1,    4;
  1,   11,     3;
  1,   26,    25;
  1,   57,   130,    15;
  1,  120,   546,   210;
  1,  247,  2037,  1750,   105;
  1,  502,  7071, 11368,  2205;
  1, 1013, 23436, 63805, 26775, 945;
  ...
		

Crossrefs

Programs

  • Maple
    G:=exp(t*exp(z)-t+(1-t)*z): Gser:=simplify(series(G,z=0,36)): for n from 0 to 33 do P[n]:=sort(n!*coeff(Gser,z,n)) od: for n from 0 to 13 do seq(coeff(P[n],t,k),k=0..floor(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n) option remember; expand(`if`(n=0, 1, add(
          `if`(i>1, x, 1)*binomial(n-1, i-1)*b(n-i), i=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Mar 08 2015, Jul 15 2017
  • Mathematica
    multinomial[n_, k_List] := n!/Times @@ (k!); b[n_, i_] :=  b[n, i] = Expand[If[n == 0, 1, If[i<1, 0, Sum[multinomial[n, Join[{n-i*j}, Array[i&, j]]]/j!*b[n-i*j, i-1]*If[i>1, x^j, 1], {j, 0, n/i}]]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n]]; Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, May 22 2015, after Alois P. Heinz *)

Formula

E.g.f.: G(t,z) = exp(t*exp(z) - t + (1-t)*z).
T(n,1) = A000295(n) (the Eulerian numbers).
Sum_{k=0..floor(n/2)} k*T(n,k) = A124325(n).
T(2n,n) = A001147(n). - Alois P. Heinz, Apr 06 2018

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

Views

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

A124327 Triangle read by rows: T(n,k) is the number of partitions of the set {1,2,...,n} such that the sum of the least entries of the blocks is k (1<=k<=n*(n+1)/2).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 1, 0, 1, 1, 0, 4, 2, 1, 3, 2, 1, 0, 1, 1, 0, 8, 4, 2, 10, 6, 7, 2, 5, 3, 2, 1, 0, 1, 1, 0, 16, 8, 4, 29, 19, 21, 14, 23, 14, 18, 10, 7, 7, 5, 3, 2, 1, 0, 1, 1, 0, 32, 16, 8, 85, 56, 64, 42, 101, 62, 75, 69, 47, 54, 38, 38, 24, 23, 10, 13, 7, 5, 3, 2, 1, 0, 1, 1, 0, 64, 32, 16
Offset: 1

Views

Author

Emeric Deutsch, Oct 31 2006

Keywords

Comments

Row n has n(n+1)/2 terms. Row sums yield the Bell numbers (A000110). T(n,1)=1; T(n,2)=0; T(n,3)=2^(n-2). for n>=2; T(n,4)=2^(n-3) for n>=3; T(n,5)=2^(n-4) for n>=4.

Examples

			T(4,7) = 2 because we have 13|2|4 and 1|23|4.
Triangle starts:
  1;
  1, 0,  1;
  1, 0,  2, 1, 0,  1;
  1, 0,  4, 2, 1,  3,  2,  1,  0,  1;
  1, 0,  8, 4, 2, 10,  6,  7,  2,  5,  3,  2,  1, 0, 1;
  1, 0, 16, 8, 4, 29, 19, 21, 14, 23, 14, 18, 10, 7, 7, 5, 3, 2, 1, 0, 1;
  ...
		

Crossrefs

Antidiagonal sums give A365821.
Row maxima give A365903.
T(n,n) gives A368204.

Programs

  • Maple
    Q[1]:=t*s: for n from 2 to 8 do Q[n]:=expand(s*diff(Q[n-1],s)+t^n*s*Q[n-1]) od: for n from 1 to 8 do P[n]:=sort(subs(s=1,Q[n])) od: for n from 1 to 8 do seq(coeff(P[n],t,k),k=1..n*(n+1)/2) od; # yields sequence in triangular form
  • Mathematica
    Q[1, t_, s_] := t s;
    Q[n_, t_, s_] := Q[n, t, s] = s D[Q[n-1, t, s], s] + s t^n Q[n-1, t, s] // Expand;
    P[n_, t_] := Q[n, t, s] /. s -> 1;
    T[n_] := Rest@CoefficientList[P[n, t], t];
    Table[T[n], {n, 1, 8}] // Flatten (* Jean-François Alcover, Jun 10 2024 *)

Formula

The generating polynomial of row n is P(n,t)=Q(n,t,1), where Q(n,t,s)=s*dQ(n-1,t,s)/ds + st^n*Q(n-1,t,s); Q(1,t,s)=ts.
Sum_{k=1..n*(n+1)/2} k * T(n,k) = A124325(n+1). - Alois P. Heinz, Dec 05 2023

A285595 Sum T(n,k) of the k-th entries in all 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, 4, 2, 17, 10, 3, 76, 52, 18, 4, 362, 274, 111, 28, 5, 1842, 1500, 675, 200, 40, 6, 9991, 8614, 4185, 1380, 325, 54, 7, 57568, 51992, 26832, 9568, 2510, 492, 70, 8, 351125, 329650, 178755, 67820, 19255, 4206, 707, 88, 9, 2259302, 2192434, 1239351, 494828, 149605, 35382, 6629, 976, 108, 10
Offset: 1

Views

Author

Alois P. Heinz, Apr 22 2017

Keywords

Comments

T(n,k) is also k times the number of blocks of size >k in all set partitions of [n+1]. T(3,2) = 10 = 2 * 5 because there are 5 blocks of size >2 in all set partitions of [4], namely in 1234, 123|4, 124|3, 134|2, 1|234.

Examples

			T(3,2) = 10 because the sum of the second entries in all blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 2+2+3+3+0  = 10.
Triangle T(n,k) begins:
      1;
      4,     2;
     17,    10,     3;
     76,    52,    18,    4;
    362,   274,   111,   28,    5;
   1842,  1500,   675,  200,   40,   6;
   9991,  8614,  4185, 1380,  325,  54,  7;
  57568, 51992, 26832, 9568, 2510, 492, 70, 8;
  ...
		

Crossrefs

Column k=1 gives A124325(n+1).
Row sums give A000110(n) * A000217(n) = A105488(n+3).
Main diagonal and first lower diagonal give: A000027, A028552.

Programs

  • Maple
    T:= proc(h) option remember; local b; b:=
          proc(n, l) option remember; `if`(n=0, [1, 0],
            (p-> p+[0, (h-n+1)*p[1]*x^1])(b(n-1, [l[], 1]))+
             add((p-> p+[0, (h-n+1)*p[1]*x^(l[j]+1)])(b(n-1,
             sort(subsop(j=l[j]+1, l), `>`))), j=1..nops(l)))
          end: (p-> seq(coeff(p, x, i), i=1..n))(b(h, [])[2])
        end:
    seq(T(n), n=1..12);
    # second Maple program:
    b:= proc(n) option remember; `if`(n=0, [1, 0],
          add((p-> p+[0, p[1]*add(x^k, k=1..j-1)])(
             b(n-j)*binomial(n-1, j-1)), j=1..n))
        end:
    T:= n-> (p-> seq(coeff(p, x, i)*i, i=1..n))(b(n+1)[2]):
    seq(T(n), n=1..12);
  • Mathematica
    b[n_] := b[n] = If[n == 0, {1, 0}, Sum[# + {0, #[[1]]*Sum[x^k, {k, 1, j-1} ]}&[b[n - j]*Binomial[n - 1, j - 1]], {j, 1, n}]];
    T[n_] := Table[Coefficient[#, x, i]*i, {i, 1, n}] &[b[n + 1][[2]]];
    Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, May 23 2018, translated from 2nd Maple program *)

Formula

T(n,k) = k * Sum_{j=k+1..n+1} binomial(n+1,j)*A000110(n+1-j).
T(n,k) = k * Sum_{j=k+1..n+1} A175757(n+1,j).
Sum_{k=1..n} T(n,k)/k = A278677(n-1).

A367850 Total sum of the block maxima minus the block minima over all partitions of [n].

Original entry on oeis.org

0, 0, 1, 6, 33, 182, 1034, 6122, 37927, 246030, 1669941, 11844324, 87644672, 675494180, 5413500801, 45040155758, 388441330457, 3467619369538, 31998729152474, 304846692965822, 2994781617653439, 30304301968015582, 315536869771786501, 3377398077726963112
Offset: 0

Views

Author

Alois P. Heinz, Dec 15 2023

Keywords

Examples

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

Crossrefs

Cf. A000110, A002538 (the same for permutations), A002620, A120325, A124325, A278677, A368338.

Programs

  • Maple
    b:= proc(n, m, t) option remember; `if`(n=0, [1, 0], (p->
          p+[0, p[1]*(n-t)])(b(n-1, m+1, t+1))+m*b(n-1, m, t+1))
        end:
    a:= n-> b(n, 0, 1)[2]:
    seq(a(n), n=0..23);
    # second Maple program:
    egf:= (z-2)*exp(2*z+exp(z)-1)+(2*z+1)*exp(z+exp(z)-1)+exp(exp(z)-1):
    a:= n-> n!*coeff(series(egf, z, n+1), z, n):
    seq(a(n), n=0..23);

Formula

E.g.f.: (z-2)*exp(2*z+exp(z)-1)+(2*z+1)*exp(z+exp(z)-1)+exp(exp(z)-1).
a(n) = A278677(n-1) - A124325(n+1) for n>=1.
a(n) = Bell(n+1)+(n+1)*Bell(n)-Bell(n+2)+Sum_{k=0..n} Stirling2(n+1,k)*(n+1-k).
a(n) = Sum_{k=0..A002620(n)} k * A368338(n,k).
a(n) mod 2 = A120325(n).
Showing 1-5 of 5 results.