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.

A285362 Sum T(n,k) of the entries in the k-th 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, 15, 12, 3, 60, 58, 28, 4, 262, 273, 185, 55, 5, 1243, 1329, 1094, 495, 96, 6, 6358, 6839, 6293, 3757, 1148, 154, 7, 34835, 37423, 36619, 26421, 11122, 2380, 232, 8, 203307, 217606, 219931, 180482, 96454, 28975, 4518, 333, 9, 1257913, 1340597, 1376929, 1230737, 787959, 308127, 67898, 7995, 460, 10
Offset: 1

Views

Author

Alois P. Heinz, Apr 17 2017

Keywords

Examples

			T(3,2) = 12 because the sum of the entries in the second blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 0+3+2+5+2 = 12.
Triangle T(n,k) begins:
      1;
      4,     2;
     15,    12,     3;
     60,    58,    28,     4;
    262,   273,   185,    55,     5;
   1243,  1329,  1094,   495,    96,    6;
   6358,  6839,  6293,  3757,  1148,  154,   7;
  34835, 37423, 36619, 26421, 11122, 2380, 232, 8;
  ...
		

Crossrefs

Row sums give A000110(n) * A000217(n) = A105488(n+3).
Main diagonal and first lower diagonal give: A000027, A006000 (for n>0).
T(2n+1,n+1) gives A285410.

Programs

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

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

A278677 a(n) = Sum_{k=0..n} A011971(n, k)*(k + 1). The Aitken-Bell triangle considered as a linear transform applied to the positive numbers.

Original entry on oeis.org

1, 5, 23, 109, 544, 2876, 16113, 95495, 597155, 3929243, 27132324, 196122796, 1480531285, 11647194573, 95297546695, 809490850313, 7126717111964, 64930685865768, 611337506786061, 5940420217001199, 59502456129204083, 613689271227219015, 6510381400140132872
Offset: 0

Views

Author

Sergey Kirgizov, Nov 26 2016

Keywords

Comments

Original name: Popularity of left children in treeshelves avoiding pattern T231 (with offset 2).
Treeshelves are ordered binary (0-1-2) increasing trees where every child is connected to its parent by a left or a right link. Classical Françon's bijection maps bijectively treeshelves into permutations. Pattern T231 illustrated below corresponds to a treeshelf constructed from permutation 231. Popularity is the sum of a certain statistic (number of left children, in this case) over all objects of size n.
a(n) is also the sum of the last entries in all blocks of all set partitions of [n-1]. a(4) = 23 because the sum of the last entries in all blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 3+5+5+4+6 = 23. - Alois P. Heinz, Apr 24 2017
a(n-2) is the number of lines that rhyme (with at least one earlier line) across all rhyme schemes counted by A000110. - Martin Fuller, Apr 20 2025

Examples

			Treeshelves of size 3:
      1  1          1    1       1        1
     /    \        /      \     / \      / \
    2      2      /        \   2   \    /   2
   /        \    2          2       3  3
  3          3    \        /
                   3      3
Pattern T231:
     1
    /
   /
  2
   \
    3
Treeshelves of size 3 that avoid pattern T231:
      1  1      1       1        1
     /    \      \     / \      / \
    2      2      \   2   \    /   2
   /        \      2       3  3
  3          3    /
                 3
Popularity of left children here is 5.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember; `if`(n=0, [1, 0],
         (p-> p+[0, p[1]*n])(b(n-1, m+1))+m*b(n-1, m))
        end:
    a:= n-> b(n+1, 0)[2]:
    seq(a(n), n=0..22);  # Alois P. Heinz, Dec 15 2023
    # Using the generating function:
    gf := ((exp(z + exp(z)-1)*(z-1)) + exp(exp(z)-1))/z^2: ser := series(gf, z, 25):
    seq((n+2)!*coeff(ser, z, n), n=0..22);  # Peter Luschny, Feb 01 2025
  • Mathematica
    a[n_] := (n+3) BellB[n+2] - BellB[n+3];
    Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Dec 01 2018 *)
  • Python
    from sympy import bell
    HOW_MANY = 30
    print([(n + 3) * bell(n+2) - bell(n + 3) for n in range(HOW_MANY)])

Formula

E.g.f.: ((exp(z + exp(z)-1)*(z-1)) + exp(exp(z)-1))/z^2.
a(n) = (n + 3)*b(n + 2) - b(n + 3) where b(n) is the n-th Bell number (see A000110).
Asymptotics: a(n) ~ n*b(n).
a(n) = Sum_{k=1..n+1} A285595(n+1,k)/k. - Alois P. Heinz, Apr 24 2017
a(n) = Sum_{k=0..n} Stirling2(n+2, k+1) * (n+1-k). - Ilya Gutkovskiy, Apr 06 2021
a(n) ~ n*Bell(n)*(1 - 1/LambertW(n)). - Vaclav Kotesovec, Jul 28 2021
a(n) = Sum_{k=n+1..(n+1)*(n+2)/2} k * A367955(n+1,k). - Alois P. Heinz, Dec 11 2023

Extensions

New name and offset 0 by Peter Luschny, Feb 01 2025

A285793 Sum T(n,k) of the k-th entries in all cycles of all permutations of [n]; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 4, 2, 18, 13, 5, 96, 83, 43, 18, 600, 582, 342, 192, 84, 4320, 4554, 2874, 1824, 1068, 480, 35280, 39672, 26232, 17832, 11784, 7080, 3240, 322560, 382248, 261288, 185688, 131256, 88920, 54360, 25200, 3265920, 4044240, 2834640, 2078640, 1534320, 1110960, 765360, 473760, 221760
Offset: 1

Views

Author

Alois P. Heinz, Apr 26 2017

Keywords

Comments

Each cycle is written with the smallest element first and cycles are arranged in increasing order of their first elements.

Examples

			T(3,2) = 13 because the sum of the second entries in all cycles of all permutations of [3] ((123), (132), (12)(3), (13)(2), (1)(23), (1)(2)(3)) is 2+3+2+3+3+0 = 13.
Triangle T(n,k) begins:
:      1;
:      4,      2;
:     18,     13,      5;
:     96,     83,     43,     18;
:    600,    582,    342,    192,     84;
:   4320,   4554,   2874,   1824,   1068,   480;
:  35280,  39672,  26232,  17832,  11784,  7080,  3240;
: 322560, 382248, 261288, 185688, 131256, 88920, 54360, 25200;
		

Crossrefs

Columns k=1-2 give: A001563, A285795.
Main diagonal and first lower diagonal give: A038720(n-1) (for n>1), A286175.
Row sums give A000142 * A000217 = A180119.

Formula

T(n,1) = n * n!.
T(n,n) = floor((n-1)!*(n+2)/2).

A124325 Number of blocks of size >1 in all partitions of an n-set.

Original entry on oeis.org

0, 0, 1, 4, 17, 76, 362, 1842, 9991, 57568, 351125, 2259302, 15288000, 108478124, 805037105, 6233693772, 50257390937, 421049519856, 3659097742426, 32931956713294, 306490813820239, 2945638599347760, 29198154161188501
Offset: 0

Views

Author

Emeric Deutsch, Oct 28 2006

Keywords

Comments

Sum of the first entries in all blocks of all set partitions of [n-1]. a(4) = 17 because the sum of the first entries in all blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 1+4+3+3+6 = 17. - Alois P. Heinz, Apr 24 2017

Examples

			a(3) = 4 because in the partitions 123, 12|3, 13|2, 1|23, 1|2|3 we have four blocks of size >1.
		

Crossrefs

Column k=2 of A283424.

Programs

  • Maple
    with(combinat): c:=n->bell(n+1)-bell(n)-n*bell(n-1): seq(c(n),n=0..23);
  • Mathematica
    nn=22;Range[0,nn]!CoefficientList[Series[(Exp[x]-1-x)Exp[Exp[x]-1],{x,0,nn}],x]  (* Geoffrey Critzer, Mar 28 2013 *)
  • PARI
    N = 66;  x = 'x + O('x^N);
    egf = (exp(x)-1-x)*exp(exp(x)-1) + 'c0;
    gf = serlaplace(egf);
    v = Vec(gf);  v[1]-='c0;  v
    /* Joerg Arndt, Mar 29 2013 */

Formula

a(n) = B(n+1)-B(n)-n*B(n-1), where B(q) are the Bell numbers (A000110).
E.g.f.: (exp(z)-1-z)*exp(exp(z)-1).
a(n) = Sum_{k=0..floor(n/2)} k*A124324(n,k).
a(n) = A285595(n-1,1). - Alois P. Heinz, Apr 24 2017
a(n) = Sum_{k=1..n*(n-1)/2} k * A124327(n-1,k) for n>1. - Alois P. Heinz, Dec 05 2023

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

Views

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;
  ...
		

Crossrefs

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

A286897 Sum T(n,k) of the k-th last 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, 5, 1, 23, 6, 1, 109, 33, 7, 1, 544, 182, 45, 8, 1, 2876, 1034, 284, 59, 9, 1, 16113, 6122, 1815, 420, 75, 10, 1, 95495, 37927, 11931, 2987, 595, 93, 11, 1, 597155, 246030, 81205, 21620, 4665, 814, 113, 12, 1, 3929243, 1669941, 573724, 160607, 36900, 6979, 1082, 135, 13, 1
Offset: 1

Views

Author

Alois P. Heinz, May 15 2017

Keywords

Examples

			T(3,2) = 6 because the sum of the second last entries in all blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 2+1+1+2 = 6.
Triangle T(n,k) begins:
      1;
      5,     1;
     23,     6,     1;
    109,    33,     7,    1;
    544,   182,    45,    8,   1;
   2876,  1034,   284,   59,   9,  1;
  16113,  6122,  1815,  420,  75, 10,  1;
  95495, 37927, 11931, 2987, 595, 93, 11, 1;
  ...
		

Crossrefs

Column k=1 gives A278677(n-1).
Row sums give A000110(n) * A000217(n) = A105488(n+3).
Cf. A285595.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, [1, 0],
          (p-> p+[0, n*p[1]*x^1])(b(n-1, [l[], 1]))+
           add((p-> p+[0, n*p[1]*x^(l[j]+1)])(b(n-1,
           sort(subsop(j=l[j]+1, l), `>`))), j=1..nops(l)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n, [])[2]):
    seq(T(n), n=1..14);
  • Mathematica
    b[0, ] = {1, 0}; b[n, l_] := b[n, l] = Function[p, p + {0, n*p[[1]]*x^1} ][b[n - 1, Append[l, 1]]] + Sum[Function[p, p + {0, n*p[[1]]*x^(l[[j]] + 1)}][b[n - 1, Reverse @ Sort[ReplacePart[l, j -> l[[j]] + 1]]]], {j, 1, Length[l]}];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, n}]][b[n, {}][[2]]];
    Table[T[n], {n, 1, 14}] // Flatten (* Jean-François Alcover, May 26 2018, from Maple *)
Showing 1-7 of 7 results.