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

A008277 Triangle of Stirling numbers of the second kind, S2(n,k), n >= 1, 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 6, 1, 1, 15, 25, 10, 1, 1, 31, 90, 65, 15, 1, 1, 63, 301, 350, 140, 21, 1, 1, 127, 966, 1701, 1050, 266, 28, 1, 1, 255, 3025, 7770, 6951, 2646, 462, 36, 1, 1, 511, 9330, 34105, 42525, 22827, 5880, 750, 45, 1, 1, 1023, 28501, 145750, 246730, 179487, 63987, 11880, 1155, 55, 1
Offset: 1

Views

Author

Keywords

Comments

Also known as Stirling set numbers and written {n, k}.
S2(n,k) counts partitions of an n-set into k nonempty subsets.
From Manfred Boergens, Apr 07 2025: (Start)
With regard to the preceding comment:
For disjoint collections of subsets see A256894.
For arbitrary collections of subsets see A163353.
For arbitrary collections of nonempty subsets see A055154. (End)
Triangle S2(n,k), 1 <= k <= n, read by rows, given by [0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, ...] DELTA [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, ...] where DELTA is Deléham's operator defined in A084938.
Number of partitions of {1, ..., n+1} into k+1 nonempty subsets of nonconsecutive integers, including the partition 1|2|...|n+1 if n=k. E.g., S2(3,2)=3 since the number of partitions of {1,2,3,4} into three subsets of nonconsecutive integers is 3, i.e., 13|2|4, 14|2|3, 1|24|3. - Augustine O. Munagi, Mar 20 2005
Draw n cards (with replacement) from a deck of k cards. Let prob(n,k) be the probability that each card was drawn at least once. Then prob(n,k) = S2(n,k)*k!/k^n (see A090582). - Rainer Rosenthal, Oct 22 2005
Define f_1(x), f_2(x), ..., such that f_1(x)=e^x and for n = 2, 3, ..., f_{n+1}(x) = (d/dx)(x*f_n(x)). Then f_n(x) = e^x*Sum_{k=1..n} S2(n,k)*x^(k-1). - Milan Janjic, May 30 2008
From Peter Bala, Oct 03 2008: (Start)
For tables of restricted Stirling numbers of the second kind see A143494 - A143496.
S2(n,k) gives the number of 'patterns' of words of length n using k distinct symbols - see [Cooper & Kennedy] for an exact definition of the term 'pattern'. As an example, the words AADCBB and XXEGTT, both of length 6, have the same pattern of letters. The five patterns of words of length 3 are AAA, AAB, ABA, BAA and ABC giving row 3 of this table as (1,3,1).
Equivalently, S2(n,k) gives the number of sequences of positive integers (N_1,...,N_n) of length n, with k distinct entries, such that N_1 = 1 and N_(i+1) <= 1 + max{j = 1..i} N_j for i >= 1 (restricted growth functions). For example, Stirling(4,2) = 7 since the sequences of length 4 having 2 distinct entries that satisfy the conditions are (1,1,1,2), (1,1,2,1), (1,2,1,1), (1,1,2,2), (1,2,2,2), (1,2,2,1) and (1,2,1,2).
(End)
Number of combinations of subsets in the plane. - Mats Granvik, Jan 13 2009
S2(n+1,k+1) is the number of size k collections of pairwise disjoint, nonempty subsets of [n]. For example: S2(4,3)=6 because there are six such collections of subsets of [3] that have cardinality two: {(1)(23)},{(12)(3)}, {(13)(2)}, {(1)(2)}, {(1)(3)}, {(2)(3)}. - Geoffrey Critzer, Apr 06 2009
Consider a set of A000217(n) balls of n colors in which, for each integer k = 1 to n, exactly one color appears in the set a total of k times. (Each ball has exactly one color and is indistinguishable from other balls of the same color.) a(n+1, k+1) equals the number of ways to choose 0 or more balls of each color in such a way that exactly (n-k) colors are chosen at least once, and no two colors are chosen the same positive number of times. - Matthew Vandermast, Nov 22 2010
S2(n,k) is the number of monotonic-labeled forests on n vertices with exactly k rooted trees, each of height one or less. See link "Counting forests with Stirling and Bell numbers" below. - Dennis P. Walsh, Nov 16 2011
If D is the operator d/dx, and E the operator xd/dx, Stirling numbers are given by: E^n = Sum_{k=1..n} S2(n,k) * x^k*D^k. - Hyunwoo Jang, Dec 13 2011
The Stirling polynomials of the second kind (a.k.a. the Bell / Touchard polynomials) are the umbral compositional inverses of the falling factorials (a.k.a. the Pochhammer symbol or Stirling polynomials of the first kind), i.e., binomial(Bell(.,x),n) = x^n/n! (cf. Copeland's 2007 formulas), implying binomial(xD,n) = binomial(Bell(.,:xD:),n) = :xD:^n/n! where D = d/dx and :xD:^n = x^n*D^n. - Tom Copeland, Apr 17 2014
S2(n,k) is the number of ways to nest n matryoshkas (Russian nesting dolls) so that exactly k matryoshkas are not contained in any other matryoshka. - Carlo Sanna, Oct 17 2015
The row polynomials R(n, x) = Sum_{k=1..n} S2(n, k)*x^k appear in the numerator of the e.g.f. of n-th powers, E(n, x) = Sum_{m>=0} m^n*x^m/m!, as E(n, x) = exp(x)*x*R(n, x), for n >= 1. - Wolfdieter Lang, Apr 02 2017
With offsets 0 for n and k this is the Sheffer product matrix A007318*A048993 denoted by (exp(t), (exp(t) - 1)) with e.g.f. exp(t)*exp(x*(exp(t) - 1)). - Wolfdieter Lang, Jun 20 2017
Number of words on k+1 unlabeled letters of length n+1 with no repeated letters. - Thomas Anton, Mar 14 2019
Also coefficients of moments of Poisson distribution about the origin expressed as polynomials in lambda. [Haight] (see also A331155). - N. J. A. Sloane, Jan 14 2020
k!*S2(n,k) is the number of surjections from an n-element set to a k-element set. - Jianing Song, Jun 01 2022

Examples

			The triangle S2(n, k) begins:
\ k    1       2       3        4         5         6         7         8        9
n \   10      11      12       13        14        15       ...
----------------------------------------------------------------------------------
1  |   1
2  |   1       1
3  |   1       3       1
4  |   1       7       6        1
5  |   1      15      25       10         1
6  |   1      31      90       65        15         1
7  |   1      63     301      350       140        21         1
8  |   1     127     966     1701      1050       266        28         1
9  |   1     255    3025     7770      6951      2646       462        36        1
10 |   1     511    9330    34105     42525     22827      5880       750       45
       1
11 |   1    1023   28501   145750    246730    179487     63987     11880     1155
      55       1
12 |   1    2047   86526   611501   1379400   1323652    627396    159027    22275
    1705      66       1
13 |   1    4095  261625  2532530   7508501   9321312   5715424   1899612   359502
   39325    2431      78        1
14 |   1    8191  788970 10391745  40075035  63436373  49329280  20912320  5135130
  752752   66066    3367       91         1
15 |   1   16383 2375101 42355950 210766920 420693273 408741333 216627840 67128490
12662650 1479478  106470     4550       105         1
...
----------------------------------------------------------------------------------
x^4 = 1 x_(1) + 7 x_(2) + 6 x_(3) + 1 x_(4), where x_(k) = P(x,k) = k!*C(x,k). - _Daniel Forgues_, Jan 16 2016
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 835.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 103ff.
  • B. A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
  • G. Boole, Finite Differences, 5th ed. New York, NY: Chelsea, 1970.
  • C. A. Charalambides, Enumerative Combinatorics, Chapman & Hall/CRC, 2002, Theorem 8.11, pp. 298-299.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 310.
  • J. H. Conway and R. K. Guy, The Book of Numbers, Springer, p. 92.
  • F. N. David, M. G. Kendall, and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 223.
  • S.N. Elaydi, An Introduction to Difference Equations, 3rd ed. Springer, 2005.
  • H. H. Goldstine, A History of Numerical Analysis, Springer-Verlag, 1977; Section 2.7.
  • R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 244.
  • Frank Avery Haight, Handbook of the Poisson distribution, John Wiley, 1967. See pages 6,7.
  • A. D. Korshunov, Asymptotic behavior of Stirling numbers of the second kind. (Russian) Metody Diskret. Analiz. No. 39 (1983), 24-41.
  • E. Kuz'min and A. I. Shirshov: On the number e, pp. 111-119, eq.(6), in: Kvant Selecta: Algebra and Analysis, I, ed. S. Tabachnikov, Am.Math.Soc., 1999, p. 116, eq. (11).
  • J. Riordan, An Introduction to Combinatorial Analysis, p. 48.
  • J. Stirling, The Differential Method, London, 1749; see p. 7.

Crossrefs

Cf. A008275 (Stirling numbers of first kind), A048993 (another version of this triangle).
See also A331155.
Cf. A000110 (row sums), A102661 (partial row sums).

Programs

  • Haskell
    a008277 n k = a008277_tabl !! (n-1) !! (k-1)
    a008277_row n = a008277_tabl !! (n-1)
    a008277_tabl = map tail $ a048993_tabl  -- Reinhard Zumkeller, Mar 26 2012
    
  • J
    n ((] (1 % !)) * +/@((^~ * (] (1 ^ |.)) * (! {:)@]) i.@>:)) k NB. _Stephen Makdisi, Apr 06 2016
    
  • Magma
    [[StirlingSecond(n,k): k in [1..n]]: n in [1..12]]; // G. C. Greubel, May 22 2019
  • Maple
    seq(seq(combinat[stirling2](n, k), k=1..n), n=1..10); # Zerinvary Lajos, Jun 02 2007
    stirling_2 := (n,k) -> (1/k!) * add((-1)^(k-i)*binomial(k,i)*i^n, i=0..k);
  • Mathematica
    Table[StirlingS2[n, k], {n, 11}, {k, n}] // Flatten (* Robert G. Wilson v, May 23 2006 *)
    BellMatrix[f_, len_] := With[{t = Array[f, len, 0]}, Table[BellY[n, k, t], {n, 0, len - 1}, {k, 0, len - 1}]];
    rows = 12;
    B = BellMatrix[1&, rows];
    Table[B[[n, k]], {n, 2, rows}, {k, 2, n}] // Flatten (* Jean-François Alcover, Jun 28 2018, after Peter Luschny *)
    a[n_, n_] := 1; a[n_, 1] := 1;
    a[n_, k_] := a[n, k] = a[n-1, k-1] + k a[n-1, k]; Flatten@
    Table[a[n, k], {n, 1, 11}, {k, 1, n}] (* Oliver Seipel, Jun 12 2024 *)
    With[{m = 11},
     Flatten@MapIndexed[Take[#, #2[[1]]] &,
       Transpose@
        Table[Range[1, m]! Coefficient[(E^x-1)^k/k! + O[x]^(m+1), x,
    Range[1, m]], {k, 1, m}]]] (* Oliver Seipel, Jun 12 2024 *)
  • Maxima
    create_list(stirling2(n+1,k+1),n,0,30,k,0,n); /* Emanuele Munarini, Jun 01 2012 */
    
  • PARI
    for(n=1,22,for(k=1,n,print1(stirling(n,k,2),", "));print()); \\ Joerg Arndt, Apr 21 2013
    
  • PARI
    Stirling2(n,k)=sum(i=0,k,(-1)^i*binomial(k,i)*i^n)*(-1)^k/k!  \\ M. F. Hasler, Mar 06 2012
    
  • Sage
    stirling_number2 # Danny Rorabaugh, Oct 11 2015
    

Formula

S2(n, k) = k*S2(n-1, k) + S2(n-1, k-1), n > 1. S2(1, k) = 0, k > 1. S2(1, 1) = 1.
E.g.f.: A(x, y) = e^(y*e^x-y). E.g.f. for m-th column: (e^x-1)^m/m!.
S2(n, k) = (1/k!) * Sum_{i=0..k} (-1)^(k-i)*binomial(k, i)*i^n.
Row sums: Bell number A000110(n) = Sum_{k=1..n} S2(n, k), n>0.
S(n, k) = Sum (i_1*i_2*...*i_(n-k)) summed over all (n-k)-combinations {i_1, i_2, ..., i_k} with repetitions of the numbers {1, 2, ..., k}. Also S(n, k) = Sum (1^(r_1)*2^(r_2)*...* k^(r_k)) summed over integers r_j >= 0, for j=1..k, with Sum{j=1..k} r_j = n-k. [Charalambides]. - Wolfdieter Lang, Aug 15 2019.
A019538(n, k) = k! * S2(n, k).
A028248(n, k) = (k-1)! * S2(n, k).
For asymptotics see Hsu (1948), among other sources.
Sum_{n>=0} S2(n, k)*x^n = x^k/((1-x)(1-2x)(1-3x)...(1-kx)).
Let P(n) = the number of integer partitions of n (A000041), p(i) = the number of parts of the i-th partition of n, d(i) = the number of distinct parts of the i-th partition of n, p(j, i) = the j-th part of the i-th partition of n, m(i, j) = multiplicity of the j-th part of the i-th partition of n, and Sum_{i=1..P(n), p(i)=m} = sum running from i=1 to i=P(n) but taking only partitions with p(i)=m parts into account. Then S2(n, m) = Sum_{i=1..P(n), p(i)=m} n!/(Product_{j=1..p(i)} p(i, j)!) * 1/(Product_{j=1..d(i)} m(i, j)!). For example, S2(6, 3) = 90 because n=6 has the following partitions with m=3 parts: (114), (123), (222). Their complexions are: (114): 6!/(1!*1!*4!) * 1/(2!*1!) = 15, (123): 6!/(1!*2!*3!) * 1/(1!*1!*1!) = 60, (222): 6!/(2!*2!*2!) * 1/(3!) = 15. The sum of the complexions is 15+60+15 = 90 = S2(6, 3). - Thomas Wieder, Jun 02 2005
Sum_{k=1..n} k*S2(n,k) = B(n+1)-B(n), where B(q) are the Bell numbers (A000110). - Emeric Deutsch, Nov 01 2006
Recurrence: S2(n+1,k) = Sum_{i=0..n} binomial(n,i)*S2(i,k-1). With the starting conditions S2(n,k) = 1 for n = 0 or k = 1 and S2(n,k) = 0 for k = 0 we have the closely related recurrence S2(n,k) = Sum_{i=k..n} binomial(n-1,i-1)*S2(i-1,k-1). - Thomas Wieder, Jan 27 2007
Representation of Stirling numbers of the second kind S2(n,k), n=1,2,..., k=1,2,...,n, as special values of hypergeometric function of type (n)F(n-1): S2(n,k)= (-1)^(k-1)*hypergeom([ -k+1,2,2,...,2],[1,1,...,1],1)/(k-1)!, i.e., having n parameters in the numerator: one equal to -k+1 and n-1 parameters all equal to 2; and having n-1 parameters in the denominator all equal to 1 and the value of the argument equal to 1. Example: S2(6,k)= seq(evalf((-1)^(k-1)*hypergeom([ -k+1,2,2,2,2,2],[1,1,1,1,1],1)/(k-1)!),k=1..6)=1,31,90,65,15,1. - Karol A. Penson, Mar 28 2007
From Tom Copeland, Oct 10 2007: (Start)
Bell_n(x) = Sum_{j=0..n} S2(n,j) * x^j = Sum_{j=0..n} E(n,j) * Lag(n,-x, j-n) = Sum_{j=0..n} (E(n,j)/n!) * (n!*Lag(n,-x, j-n)) = Sum_{j=0..n} E(n,j) * binomial(Bell.(x)+j, n) umbrally where Bell_n(x) are the Bell / Touchard / exponential polynomials; S2(n,j), the Stirling numbers of the second kind; E(n,j), the Eulerian numbers; and Lag(n,x,m), the associated Laguerre polynomials of order m.
For x = 0, the equation gives Sum_{j=0..n} E(n,j) * binomial(j,n) = 1 for n=0 and 0 for all other n. By substituting the umbral compositional inverse of the Bell polynomials, the lower factorial n!*binomial(y,n), for x in the equation, the Worpitzky identity is obtained; y^n = Sum_{j=0..n} E(n,j) * binomial(y+j,n).
Note that E(n,j)/n! = E(n,j)/(Sum_{k=0..n}E(n,k)). Also (n!*Lag(n, -1, j-n)) is A086885 with a simple combinatorial interpretation in terms of seating arrangements, giving a combinatorial interpretation to the equation for x=1; n!*Bell_n(1) = n!*Sum_{j=0..n} S2(n,j) = Sum_{j=0..n} E(n,j) * (n!*Lag(n, -1, j-n)).
(Appended Sep 16 2020) For connections to the Bernoulli numbers, extensions, proofs, and a clear presentation of the number arrays involved in the identities above, see my post Reciprocity and Umbral Witchcraft. (End)
n-th row = leftmost column of nonzero terms of A127701^(n-1). Also, (n+1)-th row of the triangle = A127701 * n-th row; deleting the zeros. Example: A127701 * [1, 3, 1, 0, 0, 0, ...] = [1, 7, 6, 1, 0, 0, 0, ...]. - Gary W. Adamson, Nov 21 2007
The row polynomials are given by D^n(e^(x*t)) evaluated at x = 0, where D is the operator (1+x)*d/dx. Cf. A147315 and A094198. See also A185422. - Peter Bala, Nov 25 2011
Let f(x) = e^(e^x). Then for n >= 1, 1/f(x)*(d/dx)^n(f(x)) = 1/f(x)*(d/dx)^(n-1)(e^x*f(x)) = Sum_{k=1..n} S2(n,k)*e^(k*x). Similar formulas hold for A039755, A105794, A111577, A143494 and A154537. - Peter Bala, Mar 01 2012
S2(n,k) = A048993(n,k), 1 <= k <= n. - Reinhard Zumkeller, Mar 26 2012
O.g.f. for the n-th diagonal is D^n(x), where D is the operator x/(1-x)*d/dx. - Peter Bala, Jul 02 2012
n*i!*S2(n-1,i) = Sum_{j=(i+1)..n} (-1)^(j-i+1)*j!/(j-i)*S2(n,j). - Leonid Bedratyuk, Aug 19 2012
G.f.: (1/Q(0)-1)/(x*y), where Q(k) = 1 - (y+k)*x - (k+1)*y*x^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Nov 09 2013
From Tom Copeland, Apr 17 2014: (Start)
Multiply each n-th diagonal of the Pascal lower triangular matrix by x^n and designate the result as A007318(x) = P(x).
With Bell(n,x)=B(n,x) defined above, D = d/dx, and :xD:^n = x^n*D^n, a Dobinski formula gives umbrally f(y)^B(.,x) = e^(-x)*e^(f(y)*x). Then f(y)^B(.,:xD:)g(x) = [f(y)^(xD)]g(x) = e^[-(1-f(y)):xD:]g(x) = g[f(y)x].
In particular, for f(y) = (1+y),
A) (1+y)^B(.,x) = e^(-x)*e^((1+y)*x) = e^(x*y) = e^[log(1+y)B(.,x)],
B) (I+dP)^B(.,x) = e^(x*dP) = P(x) = e^[x*(e^M-I)]= e^[M*B(.,x)] with dP = A132440, M = A238385-I = log(I+dP), and I = identity matrix, and
C) (1+dP)^(xD) = e^(dP:xD:) = P(:xD:) = e^[(e^M-I):xD:] = e^[M*xD] with action e^(dP:xD:)g(x) = g[(I+dP)*x].
D) P(x)^m = P(m*x), which implies (Sum_{k=1..m} a_k)^j = B(j,m*x) where the sum is umbrally evaluated only after exponentiation with (a_k)^q = B(.,x)^q = B(q,x). E.g., (a1+a2+a3)^2=a1^2+a2^2+a3^2+2(a1*a2+a1*a3+a2*a3) = 3*B(2,x)+6*B(1,x)^2 = 9x^2+3x = B(2,3x).
E) P(x)^2 = P(2x) = e^[M*B(.,2x)] = A038207(x), the face vectors of the n-Dim hypercubes.
(End)
As a matrix equivalent of some inversions mentioned above, A008277*A008275 = I, the identity matrix, regarded as lower triangular matrices. - Tom Copeland, Apr 26 2014
O.g.f. for the n-th diagonal of the triangle (n = 0,1,2,...): Sum_{k>=0} k^(k+n)*(x*e^(-x))^k/k!. Cf. the generating functions of the diagonals of A039755. Also cf. A112492. - Peter Bala, Jun 22 2014
Floor(1/(-1 + Sum_{n>=k} 1/S2(n,k))) = A034856(k-1), for k>=2. The fractional portion goes to zero at large k. - Richard R. Forberg, Jan 17 2015
From Daniel Forgues, Jan 16 2016: (Start)
Let x_(n), called a factorial term (Boole, 1970) or a factorial polynomial (Elaydi, 2005: p. 60), denote the falling factorial Product_{k=0..n-1} (x-k). Then, for n >= 1, x_(n) = Sum_{k=1..n} A008275(n,k) * x^k, x^n = Sum_{k=1..n} T(n,k) * x_(k), where A008275(n,k) are Stirling numbers of the first kind.
For n >= 1, the row sums yield the exponential numbers (or Bell numbers): Sum_{k=1..n} T(n,k) = A000110(n), and Sum_{k=1..n} (-1)^(n+k) * T(n,k) = (-1)^n * Sum_{k=1..n} (-1)^k * T(n,k) = (-1)^n * A000587(n), where A000587 are the complementary Bell numbers. (End)
Sum_{k=1..n} k*S2(n,k) = A138378(n). - Alois P. Heinz, Jan 07 2022
O.g.f. for the m-th column: x^m/(Product_{j=1..m} 1-j*x). - Daniel Checa, Aug 25 2022
S2(n,k) ~ (k^n)/k!, for fixed k as n->oo. - Daniel Checa, Nov 08 2022
S2(2n+k, n) ~ (2^(2n+k-1/2) * n^(n+k-1/2)) / (sqrt(Pi*(1-c)) * exp(n) * c^n * (2-c)^(n+k)), where c = -LambertW(-2 * exp(-2)). - Miko Labalan, Dec 21 2024
From Mikhail Kurkov, Mar 05 2025: (Start)
For a general proof of the formulas below via generating functions, see Mathematics Stack Exchange link.
Recursion for the n-th row (independently of other rows): T(n,k) = 1/(n-k)*Sum_{j=2..n-k+1} (j-2)!*binomial(-k,j)*T(n,k+j-1) for 1 <= k < n with T(n,n) = 1 (see Fedor Petrov link).
Recursion for the k-th column (independently of other columns): T(n,k) = 1/(n-k)*Sum_{j=2..n-k+1} binomial(n,j)*T(n-j+1,k)*(-1)^j for 1 <= k < n with T(n,n) = 1. (End)

A048993 Triangle of Stirling numbers of 2nd kind, S(n,k), n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 7, 6, 1, 0, 1, 15, 25, 10, 1, 0, 1, 31, 90, 65, 15, 1, 0, 1, 63, 301, 350, 140, 21, 1, 0, 1, 127, 966, 1701, 1050, 266, 28, 1, 0, 1, 255, 3025, 7770, 6951, 2646, 462, 36, 1, 0, 1, 511, 9330, 34105, 42525, 22827, 5880, 750, 45, 1
Offset: 0

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Also known as Stirling set numbers.
S(n,k) enumerates partitions of an n-set into k nonempty subsets.
The o.g.f. for the sequence of diagonal k (k=0 for the main diagonal) is G(k,x) = ((x^k)/(1-x)^(2*k+1))*Sum_{m=0..k-1} A008517(k,m+1)*x^m. A008517 is the second-order Eulerian triangle. - Wolfdieter Lang, Oct 14 2005
From Philippe Deléham, Nov 14 2007: (Start)
Sum_{k=0..n} S(n,k)*x^k = B_n(x), where B_n(x) = Bell polynomials.
The first few Bell polynomials are:
B_0(x) = 1;
B_1(x) = 0 + x;
B_2(x) = 0 + x + x^2;
B_3(x) = 0 + x + 3x^2 + x^3;
B_4(x) = 0 + x + 7x^2 + 6x^3 + x^4;
B_5(x) = 0 + x + 15x^2 + 25x^3 + 10x^4 + x^5;
B_6(x) = 0 + x + 31x^2 + 90x^3 + 65x^4 + 15x^5 + x^6;
(End)
This is the Sheffer triangle (1, exp(x) - 1), an exponential (binomial) convolution triangle. The a-sequence is given by A006232/A006233 (Cauchy sequence). The z-sequence is the zero sequence. See the link under A006232 for the definition and use of these sequences. The row sums give A000110 (Bell), and the alternating row sums give A000587 (see the Philippe Deléham formulas and crossreferences below). - Wolfdieter Lang, Oct 16 2014
Also the inverse Bell transform of the factorial numbers (A000142). For the definition of the Bell transform see A264428 and for cross-references A265604. - Peter Luschny, Dec 31 2015
From Wolfdieter Lang, Feb 21 2017: (Start)
The transposed (trans) of this lower triagonal Sheffer matrix of the associated type S = (1, exp(x) - 1) (taken as N X N matrix for arbitrarily large N) provides the transition matrix from the basis {x^n/n!}, n >= 0, to the basis {y^n/n!}, n >= 0, with y^n/n! = Sum_{m>=n} S^{trans}(n, m) x^m/m! = Sum_{m>=0} x^m/m!*S(m, n).
The Sheffer transform with S = (g, f) of a sequence {a_n} to {b_n} for n >= 0, in matrix notation vec(b) = S vec(a), satisfies, with e.g.f.s A and B, B(x) = g(x)*A(f(x)) and B(x) = A(y(x)) identically, with vec(xhat) = S^{trans,-1} vec(yhat) in symbolic notation with vec(xhat)_n = x^n/n! (similarly for vec(yhat)).
(End)
Number of partitions of {1, 2, ..., n+1} into k+1 nonempty subsets such that no subset contains two adjacent numbers. - Thomas Anton, Sep 26 2022

Examples

			The triangle S(n,k) begins:
  n\k 0 1    2     3      4       5       6      7      8     9   10 11 12
  0:  1
  1:  0 1
  2:  0 1    1
  3:  0 1    3     1
  4:  0 1    7     6      1
  5:  0 1   15    25     10       1
  6:  0 1   31    90     65      15       1
  7:  0 1   63   301    350     140      21      1
  8:  0 1  127   966   1701    1050     266     28      1
  9:  0 1  255  3025   7770    6951    2646    462     36     1
 10:  0 1  511  9330  34105   42525   22827   5880    750    45    1
 11:  0 1 1023 28501 145750  246730  179487  63987  11880  1155   55  1
 12:  0 1 2047 86526 611501 1379400 1323652 627396 159027 22275 1705 66  1
 ... reformatted and extended - _Wolfdieter Lang_, Oct 16 2014
Completely symmetric function S(4, 2) = h^{(2)}_2 = 1^2 + 2^2 + 1^1*2^1 = 7; S(5, 2) = h^{(2)}_3 = 1^3 + 2^3 + 1^2*2^1 + 1^1*2^2 = 15. - _Wolfdieter Lang_, May 26 2017
From _Wolfdieter Lang_, Aug 11 2017: (Start)
Recurrence: S(5, 3) = S(4, 2) + 2*S(4, 3) = 7 + 3*6 = 25.
Boas-Buck recurrence for column m = 3, and n = 5: S(5, 3) = (3/2)*((5/2)*S(4, 3) + 10*Bernoulli(2)*S(3, 3)) = (3/2)*(15 + 10*(1/6)*1) = 25. (End)
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 835.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 310.
  • J. H. Conway and R. K. Guy, The Book of Numbers, Springer, p. 92.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 223.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 244.
  • J. Riordan, An Introduction to Combinatorial Analysis, p. 48.

Crossrefs

See especially A008277 which is the main entry for this triangle.
A000110(n) = sum(S(n, k)) k=0..n, n >= 0. Cf. A085693.
Cf. A084938, A106800 (mirror image), A138378, A213061 (mod 2).

Programs

  • Haskell
    a048993 n k = a048993_tabl !! n !! k
    a048993_row n = a048993_tabl !! n
    a048993_tabl = iterate (\row ->
       [0] ++ (zipWith (+) row $ zipWith (*) [1..] $ tail row) ++ [1]) [1]
    -- Reinhard Zumkeller, Mar 26 2012
  • Maple
    for n from 0 to 10 do seq(Stirling2(n,k),k=0..n) od; # yields sequence in triangular form # Emeric Deutsch, Nov 01 2006
  • Mathematica
    t[n_, k_] := StirlingS2[n, k]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Robert G. Wilson v *)
  • Maxima
    create_list(stirling2(n,k),n,0,12,k,0,n); /* Emanuele Munarini, Mar 11 2011 */
    
  • PARI
    for(n=0, 22, for(k=0, n, print1(stirling(n, k, 2), ", ")); print()); \\ Joerg Arndt, Apr 21 2013
    

Formula

S(n, k) = k*S(n-1, k) + S(n-1, k-1), n > 0; S(0, k) = 0, k > 0; S(0, 0) = 1.
Equals [0, 1, 0, 2, 0, 3, 0, 4, 0, 5, ...] DELTA [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, ...] where DELTA is Deléham's operator defined in A084938.
Sum_{k = 0..n} x^k*S(n, k) = A213170(n), A000587(n), A000007(n), A000110(n), A001861(n), A027710(n), A078944(n), A144180(n), A144223(n), A144263(n) respectively for x = -2, -1, 0, 1, 2, 3, 4, 5, 6, 7. - Philippe Deléham, May 09 2004, Feb 16 2013
S(n, k) = Sum_{i=0..k} (-1)^(k+i)binomial(k, i)i^n/k!. - Paul Barry, Aug 05 2004
Sum_{k=0..n} k*S(n,k) = B(n+1)-B(n), where B(q) are the Bell numbers (A000110). - Emeric Deutsch, Nov 01 2006
Equals the inverse binomial transform of A008277. - Gary W. Adamson, Jan 29 2008
G.f.: 1/(1-xy/(1-x/(1-xy/(1-2x/(1-xy/1-3x/(1-xy/(1-4x/(1-xy/(1-5x/(1-... (continued fraction equivalent to Deléham DELTA construction). - Paul Barry, Dec 06 2009
G.f.: 1/Q(0), where Q(k) = 1 - (y+k)*x - (k+1)*y*x^2/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Nov 09 2013
Inverse of padded A008275 (padded just as A048993 = padded A008277). - Tom Copeland, Apr 25 2014
E.g.f. for the row polynomials s(n,x) = Sum_{k=0..n} S(n,k)*x^k is exp(x*(exp(z)-1)) (Sheffer property). E.g.f. for the k-th column sequence with k leading zeros is ((exp(x)-1)^k)/k! (Sheffer property). - Wolfdieter Lang, Oct 16 2014
G.f. for column k: x^k/Product_{j=1..k} (1-j*x), k >= 0 (with the empty product for k = 0 put to 1). See Abramowitz-Stegun, p. 824, 24.1.4 B. - Wolfdieter Lang, May 26 2017
Boas-Buck recurrence for column sequence m: S(n, k) = (k/(n - k))*(n*S(n-1, k)/2 + Sum_{p=k..n-2} (-1)^(n-p)*binomial(n,p)*Bernoulli(n-p)*S(p, k)), for n > k >= 0, with input T(k,k) = 1. See a comment and references in A282629. An example is given below. - Wolfdieter Lang, Aug 11 2017
The n-th row polynomial has the form x o x o ... o x (n factors), where o denotes the white diamond multiplication operator defined in Bala - see Example E4. - Peter Bala, Jan 07 2018
Sum_{k=1..n} k*S(n,k) = A138378(n). - Alois P. Heinz, Jan 07 2022
S(n,k) = Sum_{j=k..n} (-1)^(j-k)*A059297(n,j)*A354794(j,k). - Mélika Tebni, Jan 27 2023

A000357 Number of 5-level labeled rooted trees with n leaves.

Original entry on oeis.org

1, 1, 5, 35, 315, 3455, 44590, 660665, 11035095, 204904830, 4183174520, 93055783320, 2238954627848, 57903797748386, 1601122732128779, 47120734323344439, 1470076408565099152, 48449426629560437576, 1681560512531504058350, 61293054886119796799892
Offset: 0

Views

Author

Keywords

References

  • J. de la Cal, J. Carcamo, Set partitions and moments of random variables, J. Math. Anal. Applic. 378 (2011) 16 doi:10.1016/j.jmaa.2011.01.002 Remark 5
  • J. Ginsburg, Iterated exponentials, Scripta Math., 11 (1945), 340-353.
  • T. Hogg and B. A. Huberman, Attractors on finite sets: the dissipative dynamics of computing structures, Phys. Review A 32 (1985), 2338-2346.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n)=|A039813(n,1)| (first column of triangle).
Column k=4 of A144150.

Programs

  • Maple
    g:= proc(p) local b; b:=proc(n) option remember; if n=0 then 1 else (n-1)! *add(p(k)*b(n-k)/ (k-1)!/ (n-k)!, k=1..n) fi end end: a:= g(g(g(g(1)))): seq(a(n), n=0..30);  # Alois P. Heinz, Sep 11 2008
  • Mathematica
    max = 17; Join[{1}, MatrixPower[Array[StirlingS2, {max, max}], 5][[All, 1]]] (* Jean-François Alcover, Mar 03 2014 *)

Formula

E.g.f.: exp(exp(exp(exp(exp(x)-1)-1)-1)-1).

Extensions

Extended with new description by Christian G. Bower, Aug 15 1998

A039810 Matrix square of Stirling2 triangle A008277: 2-levels set partitions of [n] into k first-level subsets.

Original entry on oeis.org

1, 2, 1, 5, 6, 1, 15, 32, 12, 1, 52, 175, 110, 20, 1, 203, 1012, 945, 280, 30, 1, 877, 6230, 8092, 3465, 595, 42, 1, 4140, 40819, 70756, 40992, 10010, 1120, 56, 1, 21147, 283944, 638423, 479976, 156072, 24570, 1932, 72, 1, 115975, 2090424, 5971350, 5660615, 2350950, 487704, 53550, 3120, 90, 1
Offset: 1

Views

Author

Christian G. Bower, Feb 15 1999

Keywords

Comments

This triangle groups certain generalized Stirling numbers of the second kind A000558, A000559, ... They can also be interpreted in terms of trees of height 3 with n leaves and constraints on the order of the root.
From Peter Bala, Jul 19 2014: (Start)
The (n,k)-th entry in this table gives the number of double partitions of the set [n] = {1,2,...,n} into k blocks. To form a double partition of [n] we first write [n] as a disjoint union X_1 U...U X_k of k nonempty subsets (blocks) X_i of [n]. Then each block X_i is further partitioned into sub-blocks to give a double partition. For instance, {1,2,4} U {3,5} is a partition of [5] into 2 blocks and {{1,4},{2}} U {{3},{5}} is a refinement of this partition to a double partition of [5] into 2 blocks (and 4 sub-blocks).
Compare the above interpretation for the (n,k)-th entry of this table with the interpretation of the (n,k)-th entry of A013609 (the square of Pascal's triangle but with the rows read in reverse order) as counting the pairs (X,Y) of subsets of [n] such that |Y| = k and X is contained in Y. (End)
Also the Bell transform of the shifted Bell numbers B(n+1) without column 0. For the definition of the Bell transform see A264428. - Peter Luschny, Jan 28 2016
T(n,k) is the number of partitions of an n-set into colored blocks, such that exactly k colors are used and the colors are introduced in increasing order. T(3,2) = 6: 1a|23b, 13a|2b, 12a|3b, 1a|2a|3b, 1a|2b|3a, 1a|2b|3b. - Alois P. Heinz, Aug 27 2019

Examples

			Triangle begins:
      k = 1    2    3    4    5          sum
  n
  1       1                                1
  2       2    1                           3
  3       5    6    1                     12
  4      15   32   12    1                60
  5      52  175  110   20    1          358
Matrix multiplication Stirling2 * Stirling2:
                  1  0  0  0
                  1  1  0  0
                  1  3  1  0
                  1  7  6  1
.
  1  0  0  0      1  0  0  0
  1  1  0  0      2  1  0  0
  1  3  1  0      5  6  1  0
  1  7  6  1     15 32 12  1
From _Peter Bala_, Jul 19 2014: (Start)
T(5,2) = 175: A 5-set can be partitioned into 2 blocks as either a union of a 3-set and a 2-set or as a union of a 4-set and a singleton set.
In the first case there are 10 ways of partitioning a 5-set into a 3-set and a 2-set. Each 3-set can be further partitioned into sub-blocks in Bell(3) = 5 ways and each 2-set can be further partitioned into sub-blocks in Bell(2) = 2 ways. So altogether we obtain 10*5*2 = 100 double partitions of this type.
In the second case, there are 5 ways of partitioning a 5-set into a 4-set and a 1-set. Each 4-set can be further partitioned in Bell(4) = 15 ways and each 1-set can be further partitioned in Bell(1) = 1 way. So altogether we obtain 5*15*1 = 75 double partitions of this type.
Hence, in total, T(5,2) = 100 + 75 = 175. (End)
		

Crossrefs

Cf. A039811, A039814, A039813 (other products of Stirling matrices).
T(n, 1) = A000110(n) (first column) (Bell numbers).
T(n, 2) = A000558(n) 2-levels set partitions with 2 first-level classes.
T(n, n-1) = A002378(n-1) = n*(n-1) = 2*C(n,2) = set-partitions into (n-2) singletons and one of the two possible set partitions of [2].
Sum is A000258(n), 2-levels set partitions.
Another version with offset 0: A130191.
Horizontal mirror triangle is A046817.
T(2n,n) gives A321712.

Programs

  • Maple
    # The function BellMatrix is defined in A264428.
    # Adds (1,0,0,0, ..) as column 0.
    BellMatrix(n -> combinat:-bell(n+1), 10); # Peter Luschny, Jan 28 2016
  • Mathematica
    Flatten[Table[Sum[StirlingS2[n,i]*StirlingS2[i,k],{i,k,n}],{n,1,10},{k,1,n}]] (* Indranil Ghosh, Feb 22 2017 *)
    rows = 10;
    t = Table[BellB[n+1], {n, 0, rows}];
    T[n_, k_] := BellY[n, k, t];
    Table[T[n, k], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jun 22 2018, after Peter Luschny *)
  • PARI
    T(n, k) = sum(j=0, n, stirling(n, j, 2)*stirling(j, k, 2)); \\ Seiichi Manyama, Feb 13 2022

Formula

S2 = A008277 (Stirling numbers of the second kind).
T = (S2)^2.
T(n,k) = Sum_{i=k..n} S2(n,i) * S2(i,k).
E.g.f. of k-th column: (exp(exp(x)-1)-1)^k/k!. [corrected by Seiichi Manyama, Feb 12 2022]
From Peter Bala, Jul 19 2014: (Start)
T(n,k) = Sum_{disjoint unions X_1 U...U X_k = [n]} Bell(|X_1|)*...*Bell(|X_k|), where Bell(n) = A000110(n).
Recurrence equation: T(n+1,k+1) = Sum_{j = k..n} Bell(n+1-j)*binomial(n,j)* T(j,k).
Row sums [1,3,12,60,358,...] = A000258. (End)

Extensions

Definition and interpretation edited by Olivier Gérard, Jul 31 2011

A039817 Triangle read by rows: matrix 5th power of the Stirling-1 triangle A008275.

Original entry on oeis.org

1, -5, 1, 40, -15, 1, -440, 235, -30, 1, 6170, -4200, 775, -50, 1, -105315, 86020, -20475, 1925, -75, 1, 2120610, -2001055, 577570, -70525, 4025, -105, 1, -49242470, 52305780, -17609620, 2623145, -195300, 7490, -140, 1, 1296133195, -1520815230, 581516560, -101595060, 9264045, -464940, 12810, -180, 1
Offset: 1

Views

Author

Christian G. Bower, Feb 15 1999

Keywords

Examples

			Triangle begins:
        1;
       -5,     1;
       40,   -15,      1;
     -440,   235,    -30,    1;
     6170, -4200,    775,  -50,   1;
  -105315, 86020, -20475, 1925, -75, 1;
  ...
		

Crossrefs

Cf. A000359 (first column), A008275.

Programs

  • Mathematica
    Flatten[Table[SeriesCoefficient[(Log[1+Log[1+Log[1+Log[1+Log[1+x]]]]])^k,{x,0,n}] n!/k!, {n,9}, {k,n}]] (* Stefano Spezia, Sep 12 2022 *)

Formula

E.g.f. of k-th column: ((log(1+log(1+log(1+log(1+log(1+x))))))^k)/k!.

A039811 Triangle read by rows: matrix cube of the Stirling2 triangle A008277.

Original entry on oeis.org

1, 3, 1, 12, 9, 1, 60, 75, 18, 1, 358, 660, 255, 30, 1, 2471, 6288, 3465, 645, 45, 1, 19302, 65051, 47838, 12495, 1365, 63, 1, 167894, 728556, 685580, 235193, 35700, 2562, 84, 1, 1606137, 8792910, 10285488, 4444188, 877653, 86940, 4410, 108, 1
Offset: 1

Views

Author

Christian G. Bower, Feb 15 1999

Keywords

Examples

			Triangle begins
     1;
     3,    1;
    12,    9,    1;
    60,   75,   18,   1;
   358,  660,  255,  30,  1;
  2471, 6288, 3465, 645, 45, 1;
  ...
		

Crossrefs

Cf. A008277, A000258 (first column).
Cf. also A039810, A039812, A039813.

Programs

  • Mathematica
    Flatten[Table[SeriesCoefficient[(Exp[Exp[Exp[x]-1]-1]-1)^k, {x,0,n}] n!/k!,{n,9}, {k,n}]] (* Stefano Spezia, Sep 12 2022 *)

Formula

E.g.f. k-th column: (( exp(exp(exp(x)-1)-1)-1 )^k)/k!. [corrected by Seiichi Manyama, Feb 12 2022]

A039812 Triangle read by rows: matrix 4th power of the Stirling2 triangle A008277.

Original entry on oeis.org

1, 4, 1, 22, 12, 1, 154, 136, 24, 1, 1304, 1650, 460, 40, 1, 12915, 21904, 8550, 1160, 60, 1, 146115, 318521, 162904, 30590, 2450, 84, 1, 1855570, 5051988, 3246068, 789824, 86940, 4592, 112, 1, 26097835, 86910426, 68151304, 20606796, 2919504, 210924, 7896, 144, 1
Offset: 1

Views

Author

Christian G. Bower, Feb 15 1999

Keywords

Examples

			Triangle begins
      1;
      4,     1;
     22,    12,    1;
    154,   136,   24,    1;
   1304,  1650,  460,   40,  1;
  12915, 21904, 8550, 1160, 60, 1;
  ...
		

Crossrefs

Cf. A008277, A000307 (first column).

Programs

  • Mathematica
    Flatten[Table[SeriesCoefficient[(Exp[Exp[Exp[Exp[x]-1]-1]-1]-1)^k, {x,0,n}]  n!/k!, {n,9}, {k,n}]] (* Stefano Spezia, Sep 12 2022 *)

Formula

E.g.f. k-th column: (( exp(exp(exp(exp(x)-1)-1)-1)-1 )^k)/k!. [corrected by Seiichi Manyama, Feb 12 2022]

A351515 Expansion of e.g.f. (exp(exp(exp(exp(exp(x)-1)-1)-1)-1)-1)^2 / 2.

Original entry on oeis.org

1, 15, 215, 3325, 56605, 1060780, 21772595, 486459105, 11760431325, 305942552245, 8521928511915, 253041654671949, 7977871631560394, 266128899746035160, 9363456107172891499, 346487270686107589124, 13450341325170239245308, 546470289216642540029570
Offset: 2

Views

Author

Seiichi Manyama, Feb 12 2022

Keywords

Crossrefs

Column 2 of A039813.

Programs

  • PARI
    my(N=20, x='x+O('x^N)); Vec(serlaplace((exp(exp(exp(exp(exp(x)-1)-1)-1)-1)-1)^2/2))
    
  • PARI
    T(n, k) = if(k==0, n<=1, sum(j=0, n, stirling(n, j, 2)*T(j, k-1)));
    a(n) = sum(k=1, n-1, binomial(n-1, k)*T(k, 5)*T(n-k, 5));

Formula

a(n) = Sum_{k=1..n-1} binomial(n-1,k) * A000357(k) * A000357(n-k).
Showing 1-8 of 8 results.