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

A143494 Triangle read by rows: 2-Stirling numbers of the second kind.

Original entry on oeis.org

1, 2, 1, 4, 5, 1, 8, 19, 9, 1, 16, 65, 55, 14, 1, 32, 211, 285, 125, 20, 1, 64, 665, 1351, 910, 245, 27, 1, 128, 2059, 6069, 5901, 2380, 434, 35, 1, 256, 6305, 26335, 35574, 20181, 5418, 714, 44, 1, 512, 19171, 111645, 204205, 156660, 58107, 11130, 1110, 54, 1
Offset: 2

Views

Author

Peter Bala, Aug 20 2008

Keywords

Comments

This is the case r = 2 of the r-Stirling numbers of the second kind. The 2-Stirling numbers of the second kind give the number of ways of partitioning the set {1,2,...,n} into k nonempty disjoint subsets with the restriction that the elements 1 and 2 belong to distinct subsets.
More generally, the r-Stirling numbers of the second kind give the number of ways of partitioning the set {1,2,...,n} into k nonempty disjoint subsets with the restriction that the numbers 1, 2, ..., r belong to distinct subsets. The case r = 1 gives the usual Stirling numbers of the second kind A008277; for other cases see A143495 (r = 3) and A143496 (r = 4).
The lower unitriangular array of r-Stirling numbers of the second kind equals the matrix product P^(r-1) * S (with suitable offsets in the row and column indexing), where P is Pascal's triangle, A007318 and S is the array of Stirling numbers of the second kind, A008277.
For the definition of and entries relating to the corresponding r-Stirling numbers of the first kind see A143491. For entries on r-Lah numbers refer to A143497. The theory of r-Stirling numbers of both kinds is developed in [Broder].
From Peter Bala, Sep 19 2008: (Start)
Let D be the derivative operator d/dx and E the Euler operator x*d/dx. Then x^(-2)*E^n*x^2 = Sum_{k = 0..n} T(n+2,k+2)*x^k*D^k.
The row generating polynomials R_n(x) := Sum_{k= 2..n} T(n,k)*x^k satisfy the recurrence R_(n+1)(x) = x*R_n(x) + x*d/dx(R_n(x)) with R_2(x) = x^2. It follows that the polynomials R_n(x) have only real zeros (apply Corollary 1.2. of [Liu and Wang]).
Relation with the 2-Eulerian numbers E_2(n,j) := A144696(n,j): T(n,k) = 2!/k!*Sum_ {j = n-k..n-2} E_2(n,j)*binomial(j,n-k) for n >= k >= 2. (End)
From Wolfdieter Lang, Sep 29 2011: (Start)
T(n,k) = S(n,k,2), n>=k>=2, in Mikhailov's first paper, eq.(28) or (A3). E.g.f. column no. k from (A20) with k->2, r->k. Therefore, with offset [0,0], this triangle is the Sheffer triangle (exp(2*x),exp(x)-1) with e.g.f. of column no. m>=0: exp(2*x)*((exp(x)-1)^m)/m!. See one of the formulas given below. For Sheffer matrices see the W. Lang link under A006232 with the S. Roman reference, also found in A132393. (End)

Examples

			Triangle begins
  n\k|...2....3....4....5....6....7
  =================================
  2..|...1
  3..|...2....1
  4..|...4....5....1
  5..|...8...19....9....1
  6..|..16...65...55...14....1
  7..|..32..211..285..125...20....1
  ...
T(4,3) = 5. The set {1,2,3,4} can be partitioned into three subsets such that 1 and 2 belong to different subsets in 5 ways: {{1}{2}{3,4}}, {{1}{3}{2,4}}, {{1}{4}{2,3}}, {{2}{3}{1,4}} and {{2}{4}{1,3}}; the remaining possibility {{1,2}{3}{4}} is not allowed.
From _Peter Bala_, Feb 23 2025: (Start)
The array factorizes as
/ 1               \       /1             \ /1             \ /1            \
| 2    1           |     | 2   1          ||0  1           ||0  1          |
| 4    5   1       |  =  | 4   3   1      ||0  2   1       ||0  0  1       | ...
| 8   19   9   1   |     | 8   7   4  1   ||0  4   3  1    ||0  0  2  1    |
|16   65  55  14  1|     |16  15  11  6  1||0  8   7  4  1 ||0  0  4  3  1 |
|...               |     |...             ||...            ||...           |
where, in the infinite product on the right-hand side, the first array is the Riordan array (1/(1 - 2*x), x/(1 - x)). See A055248. (End)
		

Crossrefs

A001047 (column 3), A005493 (row sums), A008277, A016269 (column 4), A025211 (column 5), A049444 (matrix inverse), A074051 (alt. row sums).

Programs

  • Maple
    with combinat: T := (n, k) -> (1/(k-2)!)*add ((-1)^(k-i)*binomial(k-2,i)*(i+2)^(n-2),i = 0..k-2): for n from 2 to 11 do seq(T(n, k), k = 2..n) end do;
  • Mathematica
    t[n_, k_] := StirlingS2[n, k] - StirlingS2[n-1, k]; Flatten[ Table[ t[n, k], {n, 2, 11}, {k, 2, n}]] (* Jean-François Alcover, Dec 02 2011 *)
  • Sage
    @CachedFunction
    def stirling2r(n, k, r) :
        if n < r: return 0
        if n == r: return 1 if k == r else 0
        return stirling2r(n-1,k-1,r) + k*stirling2r(n-1,k,r)
    A143494 = lambda n,k: stirling2r(n, k, 2)
    for n in (2..6):
        [A143494(n, k) for k in (2..n)] # Peter Luschny, Nov 19 2012

Formula

T(n+2,k+2) = (1/k!)*Sum_{i = 0..k} (-1)^(k-i)*C(k,i)*(i+2)^n, n,k >= 0.
T(n,k) = Stirling2(n,k) - Stirling2(n-1,k) for n, k >= 2.
Recurrence relation: T(n,k) = T(n-1,k-1) + k*T(n-1,k) for n > 2, with boundary conditions T(n,1) = T(1,n) = 0 for all n, T(2,2) = 1 and T(2,k) = 0 for k > 2. Special cases: T(n,2) = 2^(n-2); T(n,3) = 3^(n-2) - 2^(n-2).
As a sum of monomial functions of degree m: T(n+m,n) = Sum_{2 <= i_1 <= ... <= i_m <= n} (i_1*i_2*...*i_m). For example, T(6,4) = Sum_{2 <= i <= j <= 4} (i*j) = 2*2 + 2*3 + 2*4 + 3*3 + 3*4 + 4*4 = 55.
E.g.f. column k+2 (with offset 2): 1/k!*exp(2*x)*(exp(x) - 1)^k.
O.g.f. k-th column: Sum_{n >= k} T(n,k)*x^n = x^k/((1-2*x)*(1-3*x)*...*(1-k*x)).
E.g.f.: exp(2*t + x*(exp(t) - 1)) = Sum_{n >= 0} Sum_{k = 0..n} T(n+2,k+2) *x^k*t^n/n! = Sum_{n >= 0} B_n(2;x)*t^n/n! = 1 + (2 + x)*t/1! + (4 + 5*x + x^2)*t^2/2! + ..., where the row polynomial B_n(2;x) := Sum_{k = 0..n} T(n+2,k+2)*x^k denotes the 2-Bell polynomial.
Dobinski-type identities: Row polynomial B_n(2;x) = exp(-x)*Sum_{i >= 0} (i + 2)^n*x^i/i!. Sum_{k = 0..n} k!*T(n+2,k+2)*x^k = Sum_{i >= 0} (i + 2)^n*x^i/(1 + x)^(i+1).
The T(n,k) are the connection coefficients between falling factorials and the shifted monomials (x + 2)^(n-2). For example, from row 4 we have 4 + 5*x + x*(x - 1) = (x + 2)^2, while from row 5 we have 8 + 19*x + 9*x*(x - 1) + x*(x - 1)*(x - 2) = (x + 2)^3.
The row sums of the array are the 2-Bell numbers, B_n(2;1), equal to A005493(n-2). The alternating row sums are the complementary 2-Bell numbers, B_n(2;-1), equal to (-1)^n*A074051(n-2).
This array is the matrix product P * S, where P denotes the Pascal triangle, A007318 and S denotes the lower triangular array of Stirling numbers of the second kind, A008277 (apply Theorem 10 of [Neuwirth]).
Also, this array equals the transpose of the upper triangular array A126351. The inverse array is A049444, the signed 2-Stirling numbers of the first kind. See A143491 for the unsigned version of the inverse.
Let f(x) = exp(exp(x)). Then for n >= 1, the row polynomials R(n,x) are given by R(n+2,exp(x)) = 1/f(x)*(d/dx)^n(exp(2*x)*f(x)). Similar formulas hold for A008277, A039755, A105794, A111577 and A154537. - Peter Bala, Mar 01 2012

A054654 Triangle of Stirling numbers of 1st kind, S(n, n-k), n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 1, 0, 1, -1, 0, 1, -3, 2, 0, 1, -6, 11, -6, 0, 1, -10, 35, -50, 24, 0, 1, -15, 85, -225, 274, -120, 0, 1, -21, 175, -735, 1624, -1764, 720, 0, 1, -28, 322, -1960, 6769, -13132, 13068, -5040, 0
Offset: 0

Views

Author

N. J. A. Sloane, Apr 18 2000

Keywords

Comments

Triangle is the matrix product of the binomial coefficients with the Stirling numbers of the first kind.
Triangle T(n,k) giving coefficients in expansion of n!*C(x,n) in powers of x. E.g., 3!*C(x,3) = x^3-3*x^2+2*x.
The matrix product of binomial coefficients with the Stirling numbers of the first kind results in the Stirling numbers of the first kind again, but the triangle is shifted by (1,1).
Essentially [1,0,1,0,1,0,1,0,...] DELTA [0,-1,-1,-2,-2,-3,-3,-4,-4,...] where DELTA is the operator defined in A084938; mirror image of the Stirling-1 triangle A048994. - Philippe Deléham, Dec 30 2006
From Doudou Kisabaka, Dec 18 2009: (Start)
The sum of the entries on each row of the triangle, starting on the 3rd row, equals 0. E.g., 1+(-3)+2+0 = 0.
The entries on the triangle can be computed as follows. T(n,r) = T(n-1,r) - (n-1)*T(n-1,r-1). T(n,r) = 0 when r equals 0 or r > n. T(n,r) = 1 if n==1. (End)

Examples

			Matrix begins:
  1, 0,  0,  0,  0,   0,    0,     0,      0, ...
  0, 1, -1,  2, -6,  24, -120,   720,  -5040, ...
  0, 0,  1, -3, 11, -50,  274, -1764,  13068, ...
  0, 0,  0,  1, -6,  35, -225,  1624, -13132, ...
  0, 0,  0,  0,  1, -10,   85,  -735,   6769, ...
  0, 0,  0,  0,  0,   1,  -15,   175,  -1960, ...
  0, 0,  0,  0,  0,   0,    1,   -21,    322, ...
  0, 0,  0,  0,  0,   0,    0,     1,    -28, ...
  0, 0,  0,  0,  0,   0,    0,     0,      1, ...
  ...
Triangle begins:
  1;
  1,   0;
  1,  -1,   0;
  1,  -3,   2,    0;
  1,  -6,  11,   -6,    0;
  1, -10,  35,  -50,   24,     0;
  1, -15,  85, -225,  274,  -120,   0;
  1, -21, 175, -735, 1624, -1764, 720, 0;
  ...
		

References

  • Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Hemisphere Publishing Corp., 1987, chapter 18, table 18:6:1 at page 152.

Crossrefs

Essentially Stirling numbers of first kind, multiplied by factorials - see A008276.
The Stirling2 counterpart is A106800.

Programs

  • Haskell
    a054654 n k = a054654_tabl !! n !! k
    a054654_row n = a054654_tabl !! n
    a054654_tabl = map reverse a048994_tabl
    -- Reinhard Zumkeller, Mar 18 2014
  • Maple
    a054654_row := proc(n) local k; seq(coeff(expand((-1)^n*pochhammer (-x,n)),x,n-k),k=0..n) end: # Peter Luschny, Nov 28 2010
    seq(seq(Stirling1(n, n-k), k=0..n), n=0..8); # Peter Luschny, Feb 21 2021
  • Mathematica
    row[n_] := Reverse[ CoefficientList[ (-1)^n*Pochhammer[-x, n], x] ]; Flatten[ Table[ row[n], {n, 0, 8}]] (* Jean-François Alcover, Feb 16 2012, after Maple *)
    Table[StirlingS1[n,n-k],{n,0,10},{k,0,n}]//Flatten (* Harvey P. Dale, Jun 17 2023 *)
  • PARI
    T(n,k)=polcoeff(n!*binomial(x,n), n-k)
    

Formula

n!*binomial(x, n) = Sum_{k=0..n} T(n, k)*x^(n-k).
(In Maple notation:) Matrix product A*B of matrix A[i,j]:=binomial(j-1,i-1) with i = 1 to p+1, j = 1 to p+1, p=8 and of matrix B[i,j]:=stirling1(j,i) with i from 1 to d, j from 1 to d, d=9.
T(n, k) = (-1)^k*Sum_{j=0..k} E2(k, j)*binomial(n+j-1, 2*k), where E2(k, j) are the second-order Eulerian numbers A340556. - Peter Luschny, Feb 21 2021

Extensions

Additional comments from Thomas Wieder, Dec 29 2006
Edited by N. J. A. Sloane at the suggestion of Eric W. Weisstein, Jan 20 2008

A126350 Triangle read by rows: matrix product of the binomial coefficients with the Stirling numbers of the second kind.

Original entry on oeis.org

1, 1, 2, 1, 5, 5, 1, 9, 22, 15, 1, 14, 61, 99, 52, 1, 20, 135, 385, 471, 203, 1, 27, 260, 1140, 2416, 2386, 877, 1, 35, 455, 2835, 9156, 15470, 12867, 4140, 1, 44, 742, 6230, 28441, 72590, 102215, 73681, 21147
Offset: 1

Views

Author

Thomas Wieder, Dec 29 2006

Keywords

Comments

Many well-known integer sequences arise from such a matrix product of combinatorial coefficients. In the present case we have as the first row (not surprisingly) A000110 = Bell or exponential numbers: ways of placing n labeled balls into n indistinguishable boxes . As second row we have A033452 = "STIRLING" transform of squares A000290. As the column sums we have 1, 3, 11, 47, 227, 1215, 7107, 44959, 305091 which is A035009 = STIRLING transform of [1,1,2,4,8,16,32, ...].

Examples

			Matrix begins:
1 2 5 15 52 203  877  4140  21147
0 1 5 22 99 471 2386 12867  73681
0 0 1  9 61 385 2416 15470 102215
0 0 0  1 14 135 1140  9156  72590
0 0 0  0 1   20  260  2835  28441
0 0 0  0 0    1   27   455   6230
0 0 0  0 0    0    1    35    742
0 0 0  0 0    0    0     1     44
0 0 0  0 0    0    0     0      1
		

Crossrefs

Programs

  • Maple
    T:= (n, k)-> add(Stirling2(n, j)*binomial(j-1, n-k), j=n-k+1..n):
    seq(seq(T(n, k), k=1..n), n=1..10);  # Alois P. Heinz, Sep 03 2019
  • Mathematica
    T[dim_] := T[dim] = Module[{M}, M[n_, n_] = 1; M[, ] = 0; Do[M[n, k] = M[n-1, k-1] + (k+2) M[n-1, k] + (k+1) M[n-1, k+1], {n, 0, dim-1}, {k, 0, n-1}]; Array[M, {dim, dim}, {0, 0}]];
    dim = 9;
    Table[T[dim][[n]][[1 ;; n]] // Reverse, {n, 1, dim}] (* Jean-François Alcover, Jun 27 2019, from Sage *)
  • Sage
    def A126350_triangle(dim): # rows in reversed order
        M = matrix(ZZ,dim,dim)
        for n in (0..dim-1): M[n,n] = 1
        for n in (1..dim-1):
            for k in (0..n-1):
                M[n,k] = M[n-1,k-1]+(k+2)*M[n-1,k]+(k+1)*M[n-1,k+1]
        return M
    A126350_triangle(9) # Peter Luschny, Sep 19 2012

Formula

(In Maple notation:) Matrix product A.B of matrix A[i,j]:=binomial(j-1,i-1) with i = 1 to p+1, j = 1 to p+1, p=8 and of matrix B[i,j]:=stirling2(j,i) with i from 1 to d, j from 1 to d, d=9.

A126353 Triangle read by rows: matrix product of the Stirling numbers of the first kind with the binomial coefficients.

Original entry on oeis.org

1, 1, 0, 1, -1, 1, 1, -3, 5, -2, 1, -6, 17, -20, 9, 1, -10, 45, -100, 109, -44, 1, -15, 100, -355, 694, -689, 265, 1, -21, 196, -1015, 3094, -5453, 5053, -1854, 1, -28, 350, -2492, 10899, -29596, 48082, -42048, 14833
Offset: 1

Views

Author

Thomas Wieder, Dec 29 2006

Keywords

Comments

Many well-known integer sequences arise from such a matrix product of combinatorial coefficients. In the present case we have as the first row A000166 = subfactorial or rencontres numbers, or derangements: number of permutations of n elements with no fixed points.

Examples

			Matrix begins:
1 0 1 -2 9 -44 265 -1854 14833
0 1 -1 5 -20 109 -689 5053 -42048
0 0 1 -3 17 -100 694 -5453 48082
0 0 0 1 -6 45 -355 3094 -29596
0 0 0 0 1 -10 100 -1015 10899
0 0 0 0 0 1 -15 196 -2492
0 0 0 0 0 0 1 -21 350
0 0 0 0 0 0 0 1 -28
0 0 0 0 0 0 0 0 1
		

Crossrefs

Signed version of A094791 [from Olivier Gérard, Jul 31 2011]

Formula

(In Maple notation:) Matrix product B.A of matrix A[i,j]:=binomial(j-1,i-1) with i = 1 to p+1, j = 1 to p+1, p=8 and of matrix B[i,j]:=stirling1(j,i) with i from 1 to d, j from 1 to d, d=9.
Showing 1-4 of 4 results.