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

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

A056858 Triangle of number of rises in restricted growth strings (RGS) for the set partitions of n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 7, 1, 1, 10, 26, 14, 1, 1, 15, 71, 89, 26, 1, 1, 21, 161, 380, 267, 46, 1, 1, 28, 322, 1268, 1709, 732, 79, 1, 1, 36, 588, 3571, 8136, 6794, 1887, 133, 1, 1, 45, 1002, 8878, 31532, 44924, 24717, 4654, 221, 1, 1, 55, 1617, 20053, 104927, 234412, 221857, 84170, 11113, 364, 1
Offset: 1

Views

Author

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

Keywords

Comments

Number of rises s_{i+1} > s_i in the RGS [s_1, ..., s_n] for a set partition of {1, ..., n}, where s_i is the index of the subset containing i, s_1 = 1 and s_i <= 1 + max_{j

Examples

			For example [1, 2, 1, 2, 2, 3] is the RGS for a set partition of {1, 2, 3, 4, 5, 6} and has 3 rises, at i = 1, i = 3 and i = 5.
1;
1,1;
1,3,1;
1,6,7,1;
1,10,26,14,1;
1,15,71,89,26,1;
1,21,161,380,267,46,1;
1,28,322,1268,1709,732,79,1;
1,36,588,3571,8136,6794,1887,133,1;
1,45,1002,8878,31532,44924,24717,4654,221,1;
1,55,1617,20053,104927,234412,221857,84170,11113,364,1;
1,66,2497,41965,310255,1025377,1528351,1006028,272557,25903,596,1;
		

References

  • W. C. Yang, Conjectures on some sequences involving set partitions and Bell numbers, preprint, 2000. [apparently unpublished, Joerg Arndt, Mar 05 2016]

Crossrefs

Cf. A000110 (row sums).
Column 1 is triangular numbers (A000217); diagonal T(n, n-1) appears to be A001924.

Programs

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

Extensions

More terms from Franklin T. Adams-Watters, Jun 08 2006
Clarified definition and edited comment and example, Joerg Arndt, Mar 05 2016

A120058 Coefficients for obtaining A120057 from Bell numbers.

Original entry on oeis.org

1, 2, -1, 3, -4, 2, 4, -9, 10, -4, 5, -16, 28, -24, 8, 6, -25, 60, -80, 56, -16, 7, -36, 110, -200, 216, -128, 32, 8, -49, 182, -420, 616, -560, 288, -64, 9, -64, 280, -784, 1456, -1792, 1408, -640, 128, 10, -81, 408, -1344, 3024, -4704, 4992, -3456, 1408, -256
Offset: 1

Author

Franklin T. Adams-Watters, Jun 06 2006, Jun 07 2006

Keywords

Comments

Appears to be essentially the same as A056863, but (as of Jun 06 2006) that sequence definition is unclear and there are discrepencies in the signs.
Alternating column sums appear to be 3^n.

Examples

			Table starts:
1
2,-1
3,-4,2
4,-9,10,-4
5,-16,28,-24,8
6,-25,60,-80,56,-16
		

Crossrefs

Programs

  • Mathematica
    T[n_, 1] := n; T[n_, n_] := (-1)^(n+1)*2^(n-2); T[n_, k_] /; 2 <= k <= n-1 := T[n, k] = 2*T[n-1, k] - 2*T[n-1, k-1] + 2*T[n-2, k-1] - T[n-2, k]; T[, ] = 0; Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Apr 08 2016, after Philippe Deléham *)

Formula

A120057(n,k) = sum_{i=1,k} T(n,i)*B(n-i+1).
T(n,k) = Sum_j A120095(n,j) * S1(j,n-k+1), where S1 is the Stirling numbers of the first kind (A008275).
Unsigned version, as an infinite lower triangular matrix, equals A007318 * A134315. - Gary W. Adamson, Oct 19 2007
T(n,k) = 2*T(n-1,k) - 2*T(n-1,k-1) + 2*T(n-2,k-1) - T(n-2,k). - Philippe Deléham, Feb 27 2012

A056861 Triangle T(n,k) is the number of restricted growth strings (RGS) of set partitions of {1..n} that have an increase at index k (1<=k

Original entry on oeis.org

1, 3, 2, 10, 7, 6, 37, 27, 23, 21, 151, 114, 97, 88, 83, 674, 523, 446, 403, 378, 363, 3263, 2589, 2217, 1999, 1867, 1785, 1733, 17007, 13744, 11829, 10658, 9923, 9452, 9145, 8942, 94828, 77821, 67340, 60689, 56380, 53541, 51644, 50361, 49484, 562595
Offset: 2

Author

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

Keywords

Comments

Number of rises s_{k+1} > s_k in an RGS [s_1, ..., s_n] of a set partition of {1, ..., n}, where s_i is the subset containing i, and s_i <= 1 + max(j
Note that the number of equalities at any index is B(n-1), where B(n) are the Bell numbers. - Franklin T. Adams-Watters, Jun 08 2006

Examples

			For example, [1, 2, 1, 2, 2, 3] is the RGS of a set partition of {1, 2, 3, 4, 5, 6} and has 3 rises, at i = 1, i = 3 and i = 5.
1;
3,2;
10,7,6;
37,27,23,21;
151,114,97,88,83;
674,523,446,403,378,363;
3263,2589,2217,1999,1867,1785,1733;
17007,13744,11829,10658,9923,9452,9145,8942;
94828,77821,67340,60689,56380,53541,51644,50361,49484;
562595,467767,406953,367101,340551,322619,310365,301905,296011,291871;
3535027,2972432,2599493,2348182,2176575,2058068,1975425,1917290,1876075, 1846648,1825501;
		

References

  • W. C. Yang, Conjectures on some sequences involving set partitions and Bell numbers, preprint, 2000. [apparently unpublished, Joerg Arndt, Mar 05 2016]

Crossrefs

Cf. Bell numbers A005493, A011965.

Programs

  • Mathematica
    b[n_, i_, m_, t_] := b[n, i, m, t] = If[n == 0, {1, 0}, Sum[Function[p, p + {0, If[jJean-François Alcover, May 23 2016, after Alois P. Heinz *)

Extensions

Edited and extended by Franklin T. Adams-Watters, Jun 08 2006
Clarified definition and edited comment and example, Joerg Arndt, Mar 08 2016
Several terms corrected, R. J. Mathar, Mar 08 2016

A056862 Triangle T(n,k) is the number of restricted growth strings (RGS) of set partitions of {1..n} that have a decrease at index k (1<=k

Original entry on oeis.org

0, 0, 1, 0, 3, 4, 0, 10, 14, 16, 0, 37, 54, 63, 68, 0, 151, 228, 271, 296, 311, 0, 674, 1046, 1264, 1396, 1478, 1530, 0, 3263, 5178, 6349, 7084, 7555, 7862, 8065, 0, 17007, 27488, 34139, 38448, 41287, 43184, 44467, 45344, 0, 94828, 155642, 195494, 222044, 239976, 252230, 260690, 266584, 270724
Offset: 2

Author

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

Keywords

Comments

Number of falls s_k > s_{k+1} in a RGS [s_1, ..., s_n] of a set partition of {1, ..., n}, where s_i is the subset containing i, s_1 = 1 and s_i <= 1 + max(j
Note that the number of equalities at any index is B(n-1), where B(n) are the Bell numbers. - Franklin T. Adams-Watters, Jun 08 2006

Examples

			For example, [1, 2, 1, 2, 2, 3] is the RGS of a set partition of {1, 2, 3, 4, 5, 6} and has 1 fall, at i = 2.
0;
0,1;
0,3,4;
0,10,14,16;
0,37,54,63,68;
0,151,228,271,296,311;
0,674,1046,1264,1396,1478,1530;
0,3263,5178,6349,7084,7555,7862,8065;
0,17007,27488,34139,38448,41287,43184,44467,45344;
0,94828,155642,195494,222044,239976,252230,260690,266584,270724;
0,562595,935534,1186845,1358452,1476959,1559602,1617737,1658952,1688379, 1709526;
		

References

  • W. C. Yang, Conjectures on some sequences involving set partitions and Bell numbers, preprint, 2000. [apparently unpublished, Joerg Arndt, Mar 05 2016]

Crossrefs

Cf. Bell numbers A005493.

Programs

  • Maple
    b:= proc(n, i, m, t) option remember; `if`(n=0, [1, 0],
          add((p-> p+[0, `if`(j (p-> seq(coeff(p, x, i), i=1..n-1))(b(n, 1, 0$2)[2]):
    seq(T(n), n=2..12);  # Alois P. Heinz, Mar 24 2016
  • Mathematica
    b[n_, i_, m_, t_] := b[n, i, m, t] = If[n == 0, {1, 0}, Sum[Function[p, p + {0, If[jJean-François Alcover, May 23 2016, after Alois P. Heinz *)

Formula

T(n,k) = B(n) - B(n-1) - A056861(n,k). - Franklin T. Adams-Watters, Jun 08 2006
Conjecture: T(n,3) = 2*A011965(n). - R. J. Mathar, Mar 08 2016

Extensions

Edited and extended by Franklin T. Adams-Watters, Jun 08 2006
Clarified definition and edited comment and example, Joerg Arndt, Mar 08 2016
Data corrected, R. J. Mathar, Mar 08 2016

A056859 Triangle of number of falls in set partitions of n.

Original entry on oeis.org

1, 2, 0, 4, 1, 0, 8, 7, 0, 0, 16, 32, 4, 0, 0, 32, 121, 49, 1, 0, 0, 64, 411, 360, 42, 0, 0, 0, 128, 1304, 2062, 624, 22, 0, 0, 0, 256, 3949, 10163, 6042, 730, 7, 0, 0, 0, 512, 11567, 45298, 45810, 12170, 617, 1, 0, 0, 0, 1024, 33056, 187941, 296017, 141822, 18325, 385, 0, 0, 0, 0
Offset: 1

Author

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

Keywords

Comments

Number of falls 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.
The maximum number of falls is in a set partition like 1,2,1,3,2,1,... - Franklin T. Adams-Watters, Jun 08 2006

Examples

			For example {1, 2, 1, 2, 2, 3} is a set partition of {1, 2, 3, 4, 5, 6} and has 1 fall, at i = 2.
T(n=3,f=0)=4 counts the partitions {1,1,1}, {1,1,2}, {1,2,2}, and {1,2,3}. T(n=3,f=1) counts the partition {1,2,1}. - _R. J. Mathar_, Mar 04 2016
1;
2,0;
4,1,0;
8,7,0,0;
16,32,4,0,0;
32,121,49,1,0,0;
64,411,360,42,0,0,0;
128,1304,2062,624,22,0,0,0;
256,3949,10163,6042,730,7,0,0,0;
512,11567,45298,45810,12170,617,1,0,0,0;
1024,33056,187941,296017,141822,18325,385,0,0,0,0;
2048,92721,739352,1708893,1318395,330407,21605,176,0,0,0,0;
		

References

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

Crossrefs

Cf. A000110 (row sums).

Programs

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

Extensions

Corrected and extended by Franklin T. Adams-Watters, Jun 08 2006
Showing 1-6 of 6 results.