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

A052889 Number of rooted set partitions.

Original entry on oeis.org

0, 1, 2, 6, 20, 75, 312, 1421, 7016, 37260, 211470, 1275725, 8142840, 54776761, 387022118, 2863489830, 22127336720, 178162416499, 1491567656472, 12959459317021, 116654844101140, 1086207322942812, 10447135955448522, 103654461984288429, 1059648140522024304
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Total number of blocks of size one in all set partitions of set {1..n}. - Wouter Meeussen, Jul 28 2003
With offset 1, number of permutations beginning with 12 and avoiding 12-3.
a(n) = number of partitions of {1...n+1} containing exactly one pair of consecutive integers, counted within a block. With offset t-1, number of partitions of {1...N} containing one string of t consecutive integers, where N=n+j, t=2+j, j = 0,1,2,.... - Augustine O. Munagi, Apr 10 2005

Examples

			a(3) = 6 because the partitions of {1, 2, 3, 4} containing a pair of consecutive integers are 124/3, 134/2, 14/23, 12/3/4, 1/23/4, 1/2/34.
		

Crossrefs

Cf. A000110.
Second column of triangle A033306.
Column k=1 of A175757.

Programs

  • Magma
    [n eq 0 select 0 else n*Bell(n-1): n in [0..30]]; // G. C. Greubel, May 11 2024
    
  • Maple
    spec := [S,{B=Set(C),C=Set(Z,1 <= card),S=Prod(Z,B)},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
    Explanation of above combstruct commands using generating functions, from Mitch Harris, Jul 28 2003:
    Z = an atom (each atom used is labeled), gf: Z(x) = x
    C = Set(Z, card <= 1) is the set of positive integers; gf: C(x) = e^(Z(x)) - 1 = e^x - 1 (the -1 removes the empty set); [x^n]C = 1 means there is exactly one set with n atoms since each atom is labeled
    B = Set(C) the set of (ordered) sets of integers = ordered set partitions; gf: B(x) = e^C(x) = e^(e^x - 1)
    S = Prod(Z, B) pairs of an atom (Z) and an ordered set partition = an ordered set partition with an adjoining single atom. The adjoining atom corresponds to choosing a "root" in the partition; gf: S(x) = x B(x) = x*e^(e^x-1)
    A052889 := n -> `if`(n=0,0,n*combinat[bell](n-1)):
    seq(A052889(n),n=0..20); # Peter Luschny, Apr 19 2011
  • Mathematica
    Range[0, 20]! CoefficientList[Series[ x Exp[Exp[x]-1], {x, 0, 20}], x] (* Geoffrey Critzer, Nov 25 2011 *)
    Table[If[n==0, 0, n*BellB[n-1]], {n,0,30}] (* G. C. Greubel, May 11 2024 *)
  • SageMath
    [0]+[n*bell_number(n-1) for n in range(1,31)] # G. C. Greubel, May 11 2024

Formula

E.g.f.: x*exp(exp(x)-1).
a(n) = n*A000110(n-1). - Vladeta Jovovic, Sep 14 2003
Let A be the upper Hessenberg matrix of order n defined by: A[i,i-1]=-1, A[i,j]=binomial(j-1,i-1), (i<=j), and A[i,j]=0 otherwise. Then, for n>=1, a(n)=(-1)^(n-1)*coeff(charpoly(A,x),x). - Milan Janjic, Jul 08 2010

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

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).
Showing 1-3 of 3 results.