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 12 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

A124323 Triangle read by rows: T(n,k) is the number of partitions of an n-set having k singleton blocks (0<=k<=n).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 3, 0, 1, 4, 4, 6, 0, 1, 11, 20, 10, 10, 0, 1, 41, 66, 60, 20, 15, 0, 1, 162, 287, 231, 140, 35, 21, 0, 1, 715, 1296, 1148, 616, 280, 56, 28, 0, 1, 3425, 6435, 5832, 3444, 1386, 504, 84, 36, 0, 1, 17722, 34250, 32175, 19440, 8610, 2772, 840, 120, 45, 0, 1
Offset: 0

Views

Author

Emeric Deutsch, Oct 28 2006

Keywords

Comments

Row sums are the Bell numbers (A000110). T(n,0)=A000296(n). T(n,k) = binomial(n,k)*T(n-k,0). Sum(k*T(n,k),k=0..n) = A052889(n) = n*B(n-1), where B(q) are the Bell numbers (A000110).
Exponential Riordan array [exp(exp(x)-1-x),x]. - Paul Barry, Apr 23 2009
Sum_{k=0..n} T(n,k)*2^k = A000110(n+1) is the number of binary relations on an n-set that are both symmetric and transitive. - Geoffrey Critzer, Jul 25 2014
Also the number of set partitions of {1, ..., n} with k cyclical adjacencies (successive elements in the same block, where 1 is a successor of n). Unlike A250104, we count {{1}} as having 1 cyclical adjacency. - Gus Wiseman, Feb 13 2019

Examples

			T(4,2)=6 because we have 12|3|4, 13|2|4, 14|2|3, 1|23|4, 1|24|3 and 1|2|34 (if we take {1,2,3,4} as our 4-set).
Triangle starts:
     1
     0    1
     1    0    1
     1    3    0    1
     4    4    6    0    1
    11   20   10   10    0    1
    41   66   60   20   15    0    1
   162  287  231  140   35   21    0    1
   715 1296 1148  616  280   56   28    0    1
  3425 6435 5832 3444 1386  504   84   36    0    1
From _Gus Wiseman_, Feb 13 2019: (Start)
Row n = 5 counts the following set partitions by number of singletons:
  {{1234}}    {{1}{234}}  {{1}{2}{34}}  {{1}{2}{3}{4}}
  {{12}{34}}  {{123}{4}}  {{1}{23}{4}}
  {{13}{24}}  {{124}{3}}  {{12}{3}{4}}
  {{14}{23}}  {{134}{2}}  {{1}{24}{3}}
                          {{13}{2}{4}}
                          {{14}{2}{3}}
... and the following set partitions by number of cyclical adjacencies:
  {{13}{24}}      {{1}{2}{34}}  {{1}{234}}  {{1234}}
  {{1}{24}{3}}    {{1}{23}{4}}  {{12}{34}}
  {{13}{2}{4}}    {{12}{3}{4}}  {{123}{4}}
  {{1}{2}{3}{4}}  {{14}{2}{3}}  {{124}{3}}
                                {{134}{2}}
                                {{14}{23}}
(End)
From _Paul Barry_, Apr 23 2009: (Start)
Production matrix is
0, 1,
1, 0, 1,
1, 2, 0, 1,
1, 3, 3, 0, 1,
1, 4, 6, 4, 0, 1,
1, 5, 10, 10, 5, 0, 1,
1, 6, 15, 20, 15, 6, 0, 1,
1, 7, 21, 35, 35, 21, 7, 0, 1,
1, 8, 28, 56, 70, 56, 28, 8, 0, 1 (End)
		

Crossrefs

A250104 is an essentially identical triangle, differing only in row 1.
For columns see A000296, A250105, A250106, A250107.

Programs

  • Maple
    G:=exp(exp(z)-1+(t-1)*z): Gser:=simplify(series(G,z=0,14)): for n from 0 to 11 do P[n]:=sort(n!*coeff(Gser,z,n)) od: for n from 0 to 11 do seq(coeff(P[n],t,k),k=0..n) od; # yields sequence in triangular form
    # Program from R. J. Mathar, Jan 22 2015:
    A124323 := proc(n,k)
        binomial(n,k)*A000296(n-k) ;
    end proc:
  • Mathematica
    Flatten[CoefficientList[Range[0,10]! CoefficientList[Series[Exp[x y] Exp[Exp[x] - x - 1], {x, 0,10}], x], y]] (* Geoffrey Critzer, Nov 24 2011 *)
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],Count[#,{}]==k&]],{n,0,9},{k,0,n}] (* _Gus Wiseman, Feb 13 2019 *)

Formula

T(n,k) = binomial(n,k)*[(-1)^(n-k)+sum((-1)^(j-1)*B(n-k-j), j=1..n-k)], where B(q) are the Bell numbers (A000110).
E.g.f.: G(t,z) = exp(exp(z)-1+(t-1)*z).
G.f.: 1/(1-xy-x^2/(1-xy-x-2x^2/(1-xy-2x-3x^2/(1-xy-3x-4x^2/(1-... (continued fraction). - Paul Barry, Apr 23 2009

A070071 a(n) = n*B(n), where B(n) are the Bell numbers, A000110.

Original entry on oeis.org

0, 1, 4, 15, 60, 260, 1218, 6139, 33120, 190323, 1159750, 7464270, 50563164, 359377681, 2672590508, 20744378175, 167682274352, 1408702786668, 12277382510862, 110822101896083, 1034483164707440, 9972266139291771, 99147746245841106, 1015496134666939958
Offset: 0

Views

Author

Karol A. Penson, Apr 19 2002

Keywords

Comments

a(n) is the total number of successions among all partitions of {1,2,...,n+1}; a succession is a pair (i,i+1) of consecutive integers lying in a block. For example, a(3)=15 because {1,2,3,4} has 6 partitions with 1 succession - 1/2/34, 1/23/4, 12/3/4, 14/23, 134/2, 124/3, 3 partitions with 2 successions - 1/234, 123/4, 12/34 and 1 partition with 3 successions - 1234. Thus a(3) = 6*1 + 3*2 + 1*3 = 15. - Augustine O. Munagi, Jul 01 2008
a(n) is the number of occurrences of integers in a list of all partitions of the set {1,...,n}. For example, the list 123, 1/23, 2/13, 3/12, 1/2/3 of all partitions of the set {1,2,3} requires 15 occurrences of integers each belonging to that set. [From Michael Hardy (hardy(AT)math.umn.edu), Nov 08 2008]
The bijection between the two foregoing characterizations is as follows: Fix x in {1,2,...,n} and associate x with the succession (x,x+1) which appears in some partitions of {1,2,...,n+1}. Replace x,x+1 by x and partition the n-set {1,2,...,x,x+2,...,n+1}, giving B(n) partitions. Thus the succession (x,x+1) occurs among partitions of {1,2,...,n+1} exactly B(n) times. - Augustine O. Munagi, Jun 02 2010

Crossrefs

Programs

  • Magma
    [n*Bell(n): n in [0..25]]; // Vincenzo Librandi, Mar 15 2014
  • Maple
    with(combinat): a:=n->sum(numbcomb (n,0)*bell(n), j=1..n): seq(a(n), n=0..21); # Zerinvary Lajos, Apr 25 2007
    with(combinat): a:=n->sum(bell(n), j=1..n): seq(a(n), n=0..21); # Zerinvary Lajos, Apr 25 2007
    a:=n->sum(sum(Stirling2(n, k), j=1..n), k=1..n): seq(a(n), n=0..21); # Zerinvary Lajos, Jun 28 2007
  • Mathematica
    a[n_] := n!*Coefficient[Series[x E^(E^x+x-1), {x, 0, n}], x, n]
    Table[Sum[BellB[n, 1], {i, 1, n}], {n, 0, 21}] (* Zerinvary Lajos, Jul 16 2009 *)
    Table[n*BellB[n], {n, 0, 20}] (* Vaclav Kotesovec, Mar 13 2014 *)
  • PARI
    a(n)=local(t); if(n<0,0,t=exp(x+O(x^n)); n!*polcoeff(x*t*exp(t-1),n))
    
  • Sage
    [bell_number(n)*n for n in range(22) ] # Zerinvary Lajos, Mar 14 2009
    

Formula

E.g.f: x*exp(x)*exp(exp(x)-1).
Sum_{k=1..n} n*binomial(n-1, k-1)*Bell(n-k), n >= 2. - Zerinvary Lajos, Nov 22 2006
a(n) ~ n^(n+1) * exp(n/LambertW(n)-1-n) / (sqrt(1+LambertW(n)) * LambertW(n)^n). - Vaclav Kotesovec, Mar 13 2014
a(n) = Sum_{k=1..n} k * A175757(n,k). - Alois P. Heinz, Mar 03 2020
a(n) = Sum_{j=0..n} n * Stirling2(n,j). - Detlef Meya, Apr 11 2024

A105488 Number of partitions of {1...n} containing 2 detached pairs of consecutive integers, i.e., partitions in which only 1- or 2-strings of consecutive integers can appear in a block and there are exactly two 2-strings.

Original entry on oeis.org

1, 6, 30, 150, 780, 4263, 24556, 149040, 951615, 6378625, 44785620, 328660566, 2515643767, 20044428810, 165955025400, 1425299331992, 12678325080012, 116635133853189, 1108221018960830, 10862073229428120, 109694927532209481, 1140199081827172719
Offset: 4

Views

Author

Augustine O. Munagi, Apr 10 2005

Keywords

Comments

Number of partitions enumerated by A105479 in which the maximal length of consecutive integers in a block is 2.
With offset 2t, number of partitions of {1...N} containing 2 detached strings of t consecutive integers, where N=n+2j, t=2+j, j = 0,1,2,..., i.e., partitions of [n] in which only v-strings of consecutive integers can appear in a block, where v=1 or v=t and there are exactly two t-strings.
Equals the minimum of the sum of the Rand distances over all A000110(n) set partitions of n elements. E.g. a(3) = 6 because over the 5 set partitions of {1, 2, 3} the sum of Rand distances from {{1}, {2}, {3}} to the rest is 6. - Andrey Goder (andy.goder(AT)gmail.com), Dec 08 2006
a(n+3) = A000110(n) * A000217(n) = Sum_{k=1..n} A285362(n,k) is the sum of the entries in all set partitions of [n]. - Alois P. Heinz, Apr 16 2017

Examples

			a(5)=6 because the partitions of {1,2,3,4,5} with 2 detached pairs of consecutive integers are 145/23,125/34,1245/3,12/34/5,12/3/45,1/23/45.
		

Crossrefs

Programs

  • Maple
    seq(binomial(n-2,2)*combinat[bell](n-3),n=4..28);
  • Mathematica
    a[n_] := Binomial[n-2, 2]*BellB[n-3];
    Table[a[n], {n, 4, 25}] (* Jean-François Alcover, May 11 2019 *)

Formula

a(n) = binomial(n-2, 2)*Bell(n-3), which is the case r = 2 in the general case of r pairs, d(n, r)=binomial(n-r, r)*Bell(n-r-1), which is the case t=2 of the general formula d(n, r, t)=binomial(n-r*(t-1), r)*B(n-r*(t-1)-1).

A033306 Triangle of coefficients of ordered cycle-index polynomials: T(n,k) = binomial(n,k)*Bell(k)*Bell(n-k).

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 5, 6, 6, 5, 15, 20, 24, 20, 15, 52, 75, 100, 100, 75, 52, 203, 312, 450, 500, 450, 312, 203, 877, 1421, 2184, 2625, 2625, 2184, 1421, 877, 4140, 7016, 11368, 14560, 15750, 14560, 11368, 7016, 4140, 21147, 37260, 63144, 85260, 98280, 98280, 85260, 63144, 37260, 21147
Offset: 0

Views

Author

Keywords

Examples

			   1;
   1,  1;
   2,  2,   2;
   5,  6,   6,   5;
  15, 20,  24,  20, 15;
  52, 75, 100, 100, 75, 52;
  ...
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 80.

Crossrefs

Cf. A000110, row sums give A001861.
Columns include A000110 and A052889.
Cf. A000807.

Programs

  • Maple
    A033306 := proc(n,k)
        if k < 0 or k > n then
            0;
        else
            binomial(n,k)*combinat[bell](k)*combinat[bell](n-k) ;
        end if;
    end proc: # R. J. Mathar, Mar 21 2013
    # second Maple program:
    b:= proc(n) option remember; expand(`if`(n>0, add(
         (x^j+1)*b(n-j)*binomial(n-1, j-1), j=1..n), 1))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Aug 30 2019
  • Mathematica
    t[n_, k_] := Binomial[n, k] * BellB[k] * BellB[n-k]; Table[t[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 14 2014 *)

Formula

E.g.f.: exp(exp(x*y)+exp(x)-2).
Sum_{k=0..2n} (-1)^k * T(2n,k) = A000807(n). - Alois P. Heinz, Feb 13 2024

Extensions

Edited by Vladeta Jovovic, Sep 17 2003

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

A177255 a(n) = Sum_{j=1..n} j*B(j-1), where B(k) = A000110(k) are the Bell numbers.

Original entry on oeis.org

0, 1, 3, 9, 29, 104, 416, 1837, 8853, 46113, 257583, 1533308, 9676148, 64452909, 451475027, 3314964857, 25442301577, 203604718076, 1695172374548, 14654631691569, 131309475792709, 1217516798735521, 11664652754184043, 115319114738472472, 1174967255260496776
Offset: 0

Views

Author

Emeric Deutsch, May 07 2010

Keywords

Comments

Number of adjacent blocks in all partitions of the set {1,2,...,n}. An adjacent block is a block of the form (i, i+1, i+2, ...). Example: a(3)=9 because in 1-2-3, 1-23, 12-3, 13-2, and 123 we have 3, 2, 2, 1, and 1 adjacent blocks, respectively.

Crossrefs

Partial sums of A052889.

Programs

  • Magma
    [n eq 0 select 0 else (&+[j*Bell(j-1): j in [1..n]]): n in [0..30]]; // G. C. Greubel, May 11 2024
    
  • Maple
    with(combinat): a := proc (n) options operator, arrow: sum(j*bell(j-1), j = 1 .. n) end proc; seq(a(n), n = 0 .. 23);
  • Mathematica
    With[{nn=30},Join[{0},Accumulate[BellB[Range[0,nn-1]]Range[nn]]]] (* Harvey P. Dale, Nov 10 2014 *)
  • SageMath
    [sum(j*bell_number(j-1) for j in range(1,1+n)) for n in range(31)] # G. C. Greubel, May 11 2024

Formula

a(n) = Sum_{k=0..n} k * A177254(n,k).

A184174 Triangle read by rows: T(n,k) is the number of partitions of the set {1,2,...,n} having k adjacent blocks of size 2, i.e., blocks of the form (i,i+1) (0 <= k <= floor(n/2)).

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 10, 4, 1, 35, 14, 3, 139, 54, 9, 1, 611, 224, 38, 4, 2925, 1027, 171, 16, 1, 15128, 5112, 822, 80, 5, 83903, 27352, 4279, 415, 25, 1, 495929, 156392, 23826, 2272, 145, 6, 3108129, 950285, 141039, 13252, 855, 36, 1, 20565721, 6107540, 883982, 81692, 5257, 238, 7
Offset: 0

Views

Author

Emeric Deutsch, Feb 09 2011

Keywords

Comments

Row n contains 1 + floor(n/2) entries.
Sum of entries in row n = A000110(n) (the Bell numbers).
T(n,0) = A184175(n).
Sum_{k>=0} k*T(n,k) = A052889(n-1).

Examples

			T(4,1)=4 because we have 12-3-4, 1-23-4, 1-2-34, 14-23. T(4,2)=1 because we have 12-34.
Triangle starts:
1;
1;
1, 1;
3, 2;
10, 4, 1;
35, 14, 3;
139, 54, 9, 1;
611, 224, 38, 4;
2925, 1027, 171, 16, 1;
15128, 5112, 822, 80, 5;
83903, 27352, 4279, 415, 25, 1;
495929, 156392, 23826, 2272, 145, 6;
3108129, 950285, 141039, 13252, 855, 36, 1; ...
		

Crossrefs

Programs

  • Maple
    with(combinat): q := 2: a := proc (n, k) options operator, arrow: sum((-1)^(k+j)*binomial(j, k)*binomial(n+j-j*q, j)*bell(n-j*q), j = k .. floor(n/q)) end proc: for n from 0 to 13 do seq(a(n, k), k = 0 .. floor(n/q)) end do; # yields sequence in triangular form
  • Mathematica
    T[n_, k_] := Sum[(-1)^(k+j)*Binomial[j, k]*Binomial[n-j, j]*BellB[n-2j], {j, k, Floor[n/2]}]; Table[T[n, k], {n, 0, 13}, {k, 0, Floor[n/2]}] // Flatten (* Jean-François Alcover, Feb 21 2017 *)
  • PARI
    {T(n,k) = my(A = sum(m=0,n, x^m/prod(k=0,m,1 - k*x + (1-y)*x^2 +x*O(x^n)))); polcoeff(polcoeff(A,n,x),k,y)}
    for(n=0,12,for(k=0,n\2,print1(T(n,k),", "));print("")) \\ Paul D. Hanna, Sep 03 2017

Formula

T(n,k) = Sum_{j=k..floor(n/2)}(-1)^(k+j)*C(j,k)*C(n-j,j)*Bell(n-2j).
G.f.: A(x,y) = Sum_{n>=0} x^n / Product_{k=0..n} (1 - k*x + (1-y)*x^2). - Paul D. Hanna, Sep 03 2017

A184176 Triangle read by rows: T(n,k) is the number of partitions of the set {1,2,...,n} having k adjacent blocks of size 3, i.e., blocks of the form (i,i+1,i+2) (0 <= k <= floor(n/3)).

Original entry on oeis.org

1, 1, 2, 4, 1, 13, 2, 46, 6, 184, 18, 1, 805, 69, 3, 3840, 288, 12, 19775, 1324, 47, 1, 109180, 6578, 213, 4, 642382, 35136, 1032, 20, 4007712, 200398, 5390, 96, 1, 26399764, 1214136, 30027, 505, 5, 182939900, 7778856, 177744, 2792, 30, 1329327991, 52501052, 1112969, 16362, 170, 1
Offset: 0

Views

Author

Emeric Deutsch, Feb 09 2011

Keywords

Comments

Number of entries in row n is 1 + floor(n/3).
Sum of entries in row n = A000110(n) (the Bell numbers).
T(n,0) = A184177(n).
Sum_{k>=0}k*T(n,k) = A052889(n-2).

Examples

			T(4,1) = 2 because we have 123-4 and 1-234.
Triangle starts:
    1;
    1;
    2;
    4,  1;
   13,  2;
   46,  6;
  184, 18,  1;
		

Crossrefs

Programs

  • Maple
    with(combinat): q := 3: a := proc (n, k) options operator, arrow: sum((-1)^(k+j)*binomial(j, k)*binomial(n+j-j*q, j)*bell(n-j*q), j = k .. floor(n/q)) end proc: for n from 0 to 15 do seq(a(n, k), k = 0 .. floor(n/q)) end do; # yields sequence in triangular form
  • Mathematica
    q = 3; a[n_, k_] := Sum[(-1)^(k+j)*Binomial[j, k]*Binomial[n+j-j*q, j]* BellB[n-j*q], {j, k, Floor[n/q]}]; Table[a[n, k], {n, 0, 15}, {k, 0, Floor[n/q]}] // Flatten (* Jean-François Alcover, Feb 22 2017, translated from Maple *)

Formula

T(n,k) = Sum_{j=k..floor(n/3)}(-1)^(k+j) * C(j,k) * C(n-2j,j) * Bell(n-3j).

A127741 a(n) = (n+1) * A005493(n).

Original entry on oeis.org

1, 6, 30, 148, 755, 4044, 22841, 136056, 853452, 5625950, 38885297, 281170080, 2122313505, 16688829122, 136457754030, 1158155642512, 10186602918035, 92711977180164, 871936904575985, 8462913158427580, 84668764368102012, 872196382566014506, 9241557859113581689
Offset: 0

Views

Author

Gary W. Adamson, Jan 27 2007

Keywords

Examples

			a(n) = sum of terms in n-th row of A127740. a(2) = 30 = (6 + 9 + 15).
		

Crossrefs

Cf. A005493, A052889, A011971, A127740 (row sums).

Programs

  • Mathematica
    lim=24;A005493=Differences[BellB[Range[lim]]];Array[(#+1)*A005493[[#+1]]&,lim-1,0] (* James C. McMahon, Jan 02 2025 *)
  • Python
    # requires Python 3.2 or higher. Otherwise use def'n of accumulate in Python docs.
    from itertools import accumulate
    A127741_list, blist, b = [], [1], 1
    for n in range(1,1001):
        blist = list(accumulate([b]+blist))
        b = blist[-1]
        A127741_list.append(blist[-2]*n) # Chai Wah Wu, Sep 20 2014

Formula

a(n) = (n+1) * A005493(n).

Extensions

Edited by Jon E. Schoenfield, May 27 2019
Showing 1-10 of 12 results. Next