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 15 results. Next

A056857 Triangle read by rows: T(n,c) = number of successive equalities in set partitions of n.

Original entry on oeis.org

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

Views

Author

Winston C. Yang (winston(AT)cs.wisc.edu), Aug 31 2000

Keywords

Comments

Number of successive equalities s_i = s_{i+1} in a set partition {s_1, ..., s_n} of {1, ..., n}, where s_i is the subset containing i, s(1) = 1 and s(i) <= 1 + max of previous s(j)'s.
T(n,c) = number of set partitions of the set {1,2,...,n} in which the size of the block containing the element 1 is k+1. Example: T(4,2)=3 because we have 123|4, 124|3 and 134|2. - Emeric Deutsch, Nov 10 2006
Let P be the lower-triangular Pascal-matrix (A007318), Then this is exp(P) / exp(1). - Gottfried Helms, Mar 30 2007. [This comment was erroneously attached to A011971, but really belongs here. - N. J. A. Sloane, May 02 2015]
From David Pasino (davepasino(AT)yahoo.com), Apr 15 2009: (Start)
As an infinite lower-triangular matrix (with offset 0 rather than 1, so the entries would be B(n - c)*binomial(n, c), B() a Bell number, rather than B(n - 1 - c)*binomial(n - 1, c) as below), this array is S P S^-1 where P is the Pascal matrix A007318, S is the Stirling2 matrix A048993, and S^-1 is the Stirling1 matrix A048994.
Also, S P S^-1 = (1/e)*exp(P). (End)
Exponential Riordan array [exp(exp(x)-1), x]. Equal to A007318*A124323. - Paul Barry, Apr 23 2009
Equal to A049020*A048994 as infinite lower triangular matrices. - Philippe Deléham, Nov 19 2011
Build a superset Q[n] of set partitions of {1,2,...,n} by distinguishing "some" (possibly none or all) of the singletons. Indexed from n >= 0, 0 <= k <= n, T(n,k) is the number of elements in Q[n] that have exactly k distinguished singletons. A singleton is a subset containing one element. T(3,1) = 6 because we have {{1}'{2,3}}, {{1,2}{3}'}, {{1,3}{2}'}, {{1}'{2}{3}}, {{1}{2}'{3}}, {{1}{2}{3}'}. - Geoffrey Critzer, Nov 10 2012
Let Bell(n,x) denote the n-th Bell polynomial, the n-th row polynomial of A048993. Then this is the triangle of connection constants when expressing the basis polynomials Bell(n,x + 1) in terms of the basis polynomials Bell(n,x). For example, row 3 is (5, 6, 3, 1) and 5 + 6*Bell(1,x) + 3*Bell(2,x) + Bell(3,x) = 5 + 6*x + 3*(x + x^2) + (x + 3*x^2 + x^3) = 5 + 10*x + 6*x^2 + x^3 = (x + 1) + 3*(x + 1)^2 + (x + 1)^3 = Bell(3,x + 1). - Peter Bala, Sep 17 2013

Examples

			For example {1, 2, 1, 2, 2, 3} is a set partition of {1, 2, 3, 4, 5, 6} and has 1 successive equality, at i = 4.
Triangle begins:
    1;
    1,   1;
    2,   2,   1;
    5,   6,   3,   1;
   15,  20,  12,   4,   1;
   52,  75,  50,  20,   5,   1;
  203, 312, 225, 100,  30,   6,   1;
  ...
From _Paul Barry_, Apr 23 2009: (Start)
Production matrix is
  1,  1;
  1,  1,  1;
  1,  2,  1,  1;
  1,  3,  3,  1,  1;
  1,  4,  6,  4,  1,  1;
  1,  5, 10, 10,  5,  1,  1;
  1,  6, 15, 20, 15,  6,  1,  1;
  1,  7, 21, 35, 35, 21,  7,  1,  1;
  1,  8, 28, 56, 70, 56, 28,  8,  1,  1; ... (End)
		

References

  • W. C. Yang, Conjectures on some sequences involving set partitions and Bell numbers, preprint, 2000. [Apparently unpublished]

Crossrefs

Cf. Bell numbers A000110 (column c=0), A052889 (c=1), A105479 (c=2), A105480 (c=3).
Cf. A056858-A056863. Essentially same as A056860, where the rows are read from right to left.
Cf. also A007318, A005493, A270953.
See A259691 for another version.
T(2n+1,n+1) gives A124102.
T(2n,n) gives A297926.

Programs

  • Maple
    with(combinat): A056857:=(n,c)->binomial(n-1,c)*bell(n-1-c): for n from 1 to 11 do seq(A056857(n,c),c=0..n-1) od; # yields sequence in triangular form; Emeric Deutsch, Nov 10 2006
    with(linalg): # Yields sequence in matrix form:
    A056857_matrix := n -> subs(exp(1)=1, exponential(exponential(
    matrix(n,n,[seq(seq(`if`(j=k+1,j,0),k=0..n-1),j=0..n-1)])))):
    A056857_matrix(8); # Peter Luschny, Apr 18 2011
  • Mathematica
    t[n_, k_] := BellB[n-1-k]*Binomial[n-1, k]; Flatten[ Table[t[n, k], {n, 1, 11}, {k, 0, n-1}]](* Jean-François Alcover, Apr 25 2012, after Emeric Deutsch *)
  • PARI
    B(n) = sum(k=0, n, stirling(n, k, 2));
    tabl(nn)={for(n=1, nn, for(k=0, n - 1, print1(B(n - 1 - k) * binomial(n - 1, k),", ");); print(););};
    tabl(12); \\ Indranil Ghosh, Mar 19 2017
    
  • Python
    from sympy import bell, binomial
    for n in range(1,12):
        print([bell(n - 1 - k) * binomial(n - 1, k) for k in range(n)]) # Indranil Ghosh, Mar 19 2017
    
  • SageMath
    def a(n): return (-1)^n / factorial(n)
    @cached_function
    def p(n, m):
        R = PolynomialRing(QQ, "x")
        if n == 0: return R(a(m))
        return R((m + x)*p(n - 1, m) - (m + 1)*p(n - 1, m + 1))
    for n in range(11): print(p(n, 0).list())  # Peter Luschny, Jun 18 2023

Formula

T(n,c) = B(n-1-c)*binomial(n-1, c), where T(n,c) is the number of set partitions of {1, ..., n} that have c successive equalities and B() is a Bell number.
E.g.f.: exp(exp(x)+x*y-1). - Vladeta Jovovic, Feb 13 2003
G.f.: 1/(1-xy-x-x^2/(1-xy-2x-2x^2/(1-xy-3x-3x^2/(1-xy-4x-4x^2/(1-... (continued fraction). - Paul Barry, Apr 23 2009
Considered as triangle T(n,k), 0 <= k <= n: T(n,k) = A007318(n,k)*A000110(n-k) and Sum_{k=0..n} T(n,k)*x^k = A000296(n), A000110(n), A000110(n+1), A005493(n), A005494(n), A045379(n) for x = -1, 0, 1, 2, 3, 4 respectively. - Philippe Deléham, Dec 13 2009
Let R(n,x) denote the n-th row polynomial of the triangle. Then A000110(n+j) = Bell(n+j,1) = Sum_{k = 1..n} R(j,k)*Stirling2(n,k) (Spivey). - Peter Bala, Sep 17 2013

Extensions

More terms from David Wasserman, Apr 22 2002

A185982 Triangle read by rows: number of set partitions of n elements with k connectors, 0<=k

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 6, 1, 1, 16, 24, 10, 1, 1, 39, 86, 61, 15, 1, 1, 105, 307, 313, 129, 21, 1, 1, 314, 1143, 1520, 891, 242, 28, 1, 1, 1035, 4513, 7373, 5611, 2161, 416, 36, 1, 1, 3723, 18956, 36627, 34213, 17081, 4658, 670, 45, 1, 1, 14494, 84546, 188396, 208230, 127540, 45095, 9187, 1025, 55, 1
Offset: 1

Views

Author

Brian Drake, Feb 08 2011

Keywords

Examples

			A connector is a pair (a, a+1) in a set partition if a is in block i and a+1 is in block i+1, for some i.  For example a(4,1) = 7, counting 1/234, 13/2/4, 14/23, 134/2, 12/34, 124/3, 123/4.
Triangle begins:
  1;
  1,   1;
  1,   3,   1;
  1,   7,   6,   1;
  1,  16,  24,  10,   1;
  1,  39,  86,  61,  15,  1;
  1, 105, 307, 313, 129, 21, 1;
  ...
		

Crossrefs

Row sums give A000110.
T(n+1,n-1) gives A000217.
T(2n,n) gives A271841.

Programs

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

Extensions

More terms from Alois P. Heinz, Oct 11 2011

A270954 Number of set partitions of [n] having no pairs (m,m+1) such that m+1 is in some block b and m is in block b+1.

Original entry on oeis.org

1, 1, 2, 4, 9, 25, 84, 323, 1377, 6412, 32312, 174941, 1011357, 6210298, 40323011, 275763910, 1979709852, 14875239212, 116679269248, 953201694216, 8093501305721, 71291395351760, 650357174742217, 6134966541625355, 59759476024690454, 600309156303711764
Offset: 0

Views

Author

Alois P. Heinz, Mar 26 2016

Keywords

Examples

			a(3) = 4: 123, 12|3, 1|23, 1|2|3.
a(4) = 9: 1234, 123|4, 12|34, 12|3|4, 1|234, 1|23|4, 14|2|3, 1|2|34, 1|2|3|4.
		

Crossrefs

Column k=0 of A270953.

Programs

  • Maple
    b:= proc(n, i, m) option remember; `if`(n=0, 1, add(
         `if`(j=i-1, 0, b(n-1, j, max(m, j))), j=1..m+1))
        end:
    a:= n-> b(n, 1, 0):
    seq(a(n), n=0..25);
  • Mathematica
    b[n_, i_, m_] := b[n, i, m] = If[n == 0, 1, Sum[If[j == i - 1, 0, b[n - 1, j, Max[m, j]]], {j, 1, m + 1}]];
    a[n_] := b[n, 1, 0];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, May 27 2018, translated from Maple *)

A270955 Number of set partitions of [n] having exactly one pair (m,m+1) such that m+1 is in some block b and m is in block b+1.

Original entry on oeis.org

1, 6, 24, 91, 374, 1699, 8410, 44794, 254718, 1538027, 9818858, 66030017, 466215802, 3446197857, 26600048069, 213901723087, 1788292021799, 15514751860549, 139443578638933, 1296371888068649, 12448726758061263, 123316489529161713, 1258632265803403708
Offset: 3

Views

Author

Alois P. Heinz, Mar 26 2016

Keywords

Examples

			a(3) = 1: 13|2.
a(4) = 6: 124|3, 134|2, 13|24, 13|2|4, 14|23, 1|24|3.
a(5) = 24: 1235|4, 1245|3, 124|35, 124|3|5, 125|34, 12|35|4, 1345|2, 134|25, 134|2|5, 13|245, 13|24|5, 135|2|4, 13|2|45, 13|2|4|5, 145|23, 14|235, 14|23|5, 15|234, 1|235|4, 1|245|3, 1|24|35, 1|24|3|5, 1|25|34, 1|2|35|4.
		

Crossrefs

Column k=1 of A270953.

Programs

  • Maple
    b:= proc(n, i, m) option remember; convert(series(
          `if`(n=0, 1, add(b(n-1, j, max(m, j))*
          `if`(j=i-1, x, 1), j=1..m+1)), x, 2), polynom)
        end:
    a:= n-> coeff(b(n, 1, 0), x, 1):
    seq(a(n), n=3..30);
  • Mathematica
    b[n_, i_, m_] := b[n, i, m] = If[n == 0, 1, Sum[b[n - 1, j, Max[m, j]]*If[j == i - 1, x, 1], {j, 1, m + 1}]] + O[x]^2 // Normal;
    a[n_] := Coefficient[b[n, 1, 0], x, 1];
    Table[a[n], {n, 3, 30}] (* Jean-François Alcover, May 27 2018, translated from Maple *)

A270956 Number of set partitions of [n] having exactly two pairs (m,m+1) such that m+1 is in some block b and m is in block b+1.

Original entry on oeis.org

3, 27, 159, 857, 4726, 27385, 167097, 1071422, 7203162, 50674005, 372321574, 2851766861, 22729523020, 188191920799, 1616005571254, 14370046950779, 132139869946194, 1254871372262202, 12292010800020819, 124053806137088093, 1288543305931949964
Offset: 5

Views

Author

Alois P. Heinz, Mar 26 2016

Keywords

Examples

			a(5) = 3: 135|24, 13|25|4, 15|24|3.
a(6) = 27: 1246|35, 124|36|5, 126|35|4, 1346|25, 134|26|5, 1356|24, 135|246, 135|24|6, 136|245, 13|246|5, 13|256|4, 13|25|46, 13|25|4|6, 13|26|45, 13|2|46|5, 146|235, 14|236|5, 16|235|4, 156|24|3, 15|246|3, 15|24|36, 15|24|3|6, 16|245|3, 1|246|35, 1|24|36|5, 16|25|34, 1|26|35|4.
		

Crossrefs

Column k=2 of A270953.

A270957 Number of set partitions of [n] having exactly three pairs (m,m+1) such that m+1 is in some block b and m is in block b+1.

Original entry on oeis.org

1, 21, 197, 1421, 9573, 64724, 449567, 3230230, 24053169, 185658621, 1484943532, 12299106220, 105400873263, 933717036862, 8541991253431, 80620086997245, 784225175253212, 7854824886117957, 80933906884404094, 857116366195307414, 9321782438290435408
Offset: 6

Views

Author

Alois P. Heinz, Mar 26 2016

Keywords

Examples

			a(6) = 1: 136|25|4.
a(7) = 21: 1247|36|5, 1347|26|5, 1357|246, 135|247|6, 137|246|5, 1367|25|4, 136|257|4, 136|25|47, 136|25|4|7, 137|256|4, 13|257|46, 13|25|47|6, 137|26|45, 13|27|46|5, 147|236|5, 157|246|3, 15|247|36, 15|24|37|6, 17|246|35, 1|247|36|5, 17|26|35|4.
		

Crossrefs

Column k=3 of A270953.

A270958 Number of set partitions of [n] having exactly four pairs (m,m+1) such that m+1 is in some block b and m is in block b+1.

Original entry on oeis.org

10, 174, 1783, 15158, 121464, 965616, 7776877, 64017975, 540759958, 4695640591, 41947390960, 385584558062, 3646493831801, 35466401895010, 354594794206614, 3642294128252241, 38413175987708429, 415694601586123128, 4612983463942832627, 52460139965678764835
Offset: 8

Views

Author

Alois P. Heinz, Mar 26 2016

Keywords

Examples

			a(8) = 10: 1358|247|6, 1368|257|4, 136|258|47, 136|25|48|7, 138|257|46, 13|258|47|6, 138|27|46|5, 158|247|36, 15|248|37|6, 18|247|36|5.
		

Crossrefs

Column k=4 of A270953.

A270959 Number of set partitions of [n] having exactly five pairs (m,m+1) such that m+1 is in some block b and m is in block b+1.

Original entry on oeis.org

4, 127, 1856, 20074, 191967, 1753407, 15845905, 144101608, 1329935983, 12512797900, 120312183453, 1183814298898, 11928314725101, 123117825217659, 1301722909447207, 14096302961791594, 156301760858165116, 1773962132569829592, 20600385809700410195
Offset: 9

Views

Author

Alois P. Heinz, Mar 26 2016

Keywords

Examples

			a(9) = 4: 1369|258|47, 136|259|48|7, 139|258|47|6, 159|248|37|6.
		

Crossrefs

Column k=5 of A270953.

A270960 Number of set partitions of [n] having exactly six pairs (m,m+1) such that m+1 is in some block b and m is in block b+1.

Original entry on oeis.org

1, 76, 1650, 23031, 264716, 2788215, 28315287, 284453798, 2865664275, 29172005637, 301410662549, 3169264274716, 33967946651067, 371460612845541, 4146934516914449, 47274580420037008, 550357684288267873, 6542615612312034842, 79410538735157560508
Offset: 10

Views

Author

Alois P. Heinz, Mar 26 2016

Keywords

Examples

			a(10) = 1: 136(10)|259|48|7.
		

Crossrefs

Column k=6 of A270953.

A270961 Number of set partitions of [n] having exactly seven pairs (m,m+1) such that m+1 is in some block b and m is in block b+1.

Original entry on oeis.org

36, 1260, 23258, 324891, 3968251, 45402693, 504270360, 5543886289, 61008463952, 676542685621, 7591571114493, 86426778077884, 999973097589274, 11771498403908062, 141085372337100460, 1722345651885728412, 21421106761851959049, 271444082790121795320
Offset: 12

Views

Author

Alois P. Heinz, Mar 26 2016

Keywords

Examples

			a(12) = 36: 1358(12)|247(11)|6(10)|9, 1368(12)|257(11)|4(10)|9, 1369(12)|258(11)|47(10), 1369|258(12)|47(11)|(10), 136(12)|258(11)|47(10)|9, 136(10)(12)|259(11)|48|7, 136(10)|259(12)|48(11)|7, 136(10)|259|48(12)|7(11), 136(10)|259|48|7(12)|(11), 136(12)|259(11)|48(10)|7, 136|259(12)|48(11)|7(10), 136|259|48(12)|7(11)|(10), 136(12)|25(11)|48(10)|79, 136|25(12)|48(11)|7(10)|9, 136(12)|25(11)|4(10)|79|8, 138(12)|257(11)|46(10)|9, 139(12)|258(11)|47(10)|6, 139|258(12)|47(11)|6(10), 139|258|47(12)|6(11)|(10), 13(12)|258(11)|47(10)|69, 13|258(12)|47(11)|6(10)|9, 13(12)|25(11)|47(10)|69|8, 138(12)|27(11)|46(10)|59, 138|27(12)|46(11)|5(10)|9, 13(12)|27(11)|46(10)|59|8, 158(12)|247(11)|36(10)|9, 159(12)|248(11)|37(10)|6, 159|248(12)|37(11)|6(10), 159|248|37(12)|6(11)|(10), 15(12)|248(11)|37(10)|69, 15|248(12)|37(11)|6(10)|9, 15(12)|24(11)|37(10)|69|8, 18(12)|247(11)|36(10)|59, 18|247(12)|36(11)|5(10)|9, 1(12)|247(11)|36(10)|59|8, 17(12)|26(11)|35(10)|49|8.
		

Crossrefs

Column k=7 of A270953.
Showing 1-10 of 15 results. Next