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.

A269945 Triangle read by rows. Stirling set numbers of order 2, T(n, n) = 1, T(n, k) = 0 if k < 0 or k > n, otherwise T(n, k) = T(n-1, k-1) + k^2*T(n-1, k), for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 5, 1, 0, 1, 21, 14, 1, 0, 1, 85, 147, 30, 1, 0, 1, 341, 1408, 627, 55, 1, 0, 1, 1365, 13013, 11440, 2002, 91, 1, 0, 1, 5461, 118482, 196053, 61490, 5278, 140, 1, 0, 1, 21845, 1071799, 3255330, 1733303, 251498, 12138, 204, 1
Offset: 0

Views

Author

Peter Luschny, Mar 22 2016

Keywords

Comments

Also known as central factorial numbers T(2*n, 2*k) (cf. A036969).
The analog for the Stirling cycle numbers is A269944.

Examples

			Triangle starts:
  [0] [1]
  [1] [0, 1]
  [2] [0, 1,   1]
  [3] [0, 1,   5,    1]
  [4] [0, 1,  21,   14,   1]
  [5] [0, 1,  85,  147,  30,  1]
  [6] [0, 1, 341, 1408, 627, 55, 1]
		

Crossrefs

Columns k=0..5 give A000007, A000012, A002450(n-1), A002451(n-3), A383838(n-4), A383840(n-5).
Variants are: A008957, A036969.
Cf. A007318 (order 0), A048993 (order 1), A269948 (order 3).
Cf. A000330 (subdiagonal), A002450 (column 2), A135920 (row sums), A269941, A269944 (Stirling cycle), A298851 (central terms).

Programs

  • Maple
    T := proc(n, k) option remember;
        `if`(n=k, 1,
        `if`(k<0 or k>n, 0,
         T(n-1, k-1) + k^2*T(n-1, k))) end:
    for n from 0 to 9 do seq(T(n, k), k=0..n) od;
    # Alternatively with the P-transform (cf. A269941):
    A269945_row := n -> PTrans(n, n->`if`(n=1, 1, 1/(n*(4*n-2))), (n, k)->(-1)^k*(2*n)!/(2*k)!): seq(print(A269945_row(n)), n=0..8);
    # Using the exponential generating function:
    egf := 1 + t^2*(cosh(2*sinh(t*x/2)/t));
    ser := series(egf, x, 20): cx := n -> coeff(ser, x, 2*n):
    Trow := n -> local k; seq((2*n)!*coeff(cx(n), t, 2*(n-k+1)), k = 0..n):
    seq(print(Trow(n)), n = 0..9);  # Peter Luschny, Feb 29 2024
  • Mathematica
    T[n_, n_] = 1; T[n_ /; n >= 0, k_] /; 0 <= k < n := T[n, k] = T[n - 1, k - 1] + k^2*T[n - 1, k]; T[, ] = 0; Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten
    (* Jean-François Alcover, Nov 27 2017 *)
  • Sage
    # uses[PtransMatrix from A269941]
    stirset2 = lambda n: 1 if n == 1 else 1/(n*(4*n-2))
    norm = lambda n,k: (-1)^k*factorial(2*n)/factorial(2*k)
    M = PtransMatrix(7, stirset2, norm)
    for m in M: print(m)

Formula

T(n, k) = (-1)^k*((2*n)! / (2*k)!)*P[n, k](s(n)) where P is the P-transform and s(n) = 1/(n*(4*n-2)). The P-transform is defined in the link. Compare also the Sage and Maple implementations below.
T(n, 2) = (4^(n - 1) - 1)/3 for n >= 2 (cf. A002450).
T(n, n-1) = n*(n - 1)*(2*n - 1)/6 for n >= 1 (cf. A000330).
From Fabián Pereyra, Apr 25 2022: (Start)
T(n, k) = (1/(2*k)!)*Sum_{j=0..2*k} (-1)^j*binomial(2*k, j)*(k - j)^(2*n).
T(n, k) = Sum_{j=2*k..2*n} (-k)^(2*n - j)*binomial(2*n, j)*Stirling2(j, 2*k).
T(n, k) = Sum_{j=0..2*n} (-1)^(j - k)*Stirling2(2*n - j, k)*Stirling2(j, k). (End)
T(n, k) = (2*n)! [t^(2*(n-k+1))] [x^(2*n)] (1 + t^2*(cosh(2*sinh(t*x/2)/t))). - Peter Luschny, Feb 29 2024