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.

A358622 Regular triangle read by rows. T(n, k) = [[n, k]], where [[n, k]] are the second order Stirling cycle numbers (or second order reciprocal Stirling numbers). T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 6, 3, 0, 0, 0, 24, 20, 0, 0, 0, 0, 120, 130, 15, 0, 0, 0, 0, 720, 924, 210, 0, 0, 0, 0, 0, 5040, 7308, 2380, 105, 0, 0, 0, 0, 0, 40320, 64224, 26432, 2520, 0, 0, 0, 0, 0, 0, 362880, 623376, 303660, 44100, 945, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Peter Luschny, Nov 23 2022

Keywords

Comments

[[n, k]] are the number of permutations of an n-set having at least two elements in each orbit. These permutations have no fixed points and therefore [[n, k]] is the number of k-orbit derangements of an n-set. This is the definition and notation (doubling the stacked delimiters of the Stirling cycle numbers) as given by Fekete (see link).
The formal definition expresses the second order Stirling cycle numbers as a binomial sum over second order Eulerian numbers (see the first formula below). The terminology 'associated Stirling numbers of first kind' used elsewhere should be dropped in favor of the more systematic one used here.
Also the Bell transform of the factorial numbers with 0! = 0. For the definition of the Bell transform see A264428.

Examples

			Triangle T(n, k) starts:
[0] 1;
[1] 0,     0;
[2] 0,     1,     0;
[3] 0,     2,     0,     0;
[4] 0,     6,     3,     0,    0;
[5] 0,    24,    20,     0,    0,  0;
[6] 0,   120,   130,    15,    0,  0,  0;
[7] 0,   720,   924,   210,    0,  0,  0,  0;
[8] 0,  5040,  7308,  2380,  105,  0,  0,  0,  0;
[9] 0, 40320, 64224, 26432, 2520,  0,  0,  0,  0,  0;
		

References

  • Ronald L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics, Addison-Wesley, Reading, 2nd ed. 1994, thirty-fourth printing 2022.

Crossrefs

A008306 is an irregular subtriangle with more information.
Cf. A000166 (row sums), A024000 (alternating row sums).

Programs

  • Maple
    P := (n, x) -> (-x)^n*hypergeom([-n, x], [], 1/x):
    row := n -> seq(coeff(simplify(P(n, x)), x, k), k = 0..n):
    for n from 0 to 9 do row(n) od;
    # Alternative:
    T := (n, k) -> add(binomial(n, k - j)*abs(Stirling1(n - k + j, j))*(-1)^(k - j), j =  0..k): for n from 0 to 9 do seq(T(n, k), k = 0..n) od;
    # Using the e.g.f.:
    egf := (exp(t)*(1 - t))^(-z): ser := series(egf, t, 12):
    seq(print(seq(n!*coeff(coeff(ser, t, n), z, k), k=0..n)), n = 0..9);
    # Using second order Eulerian numbers:
    A358622 := proc(n, k) local j;
    add(binomial(j, n - 2*k)*combinat:-eulerian2(n - k, j), j = 0..n-k) end:
    seq(seq(A358622(n, k), k = 0..n), n = 0..12);
    # Using generalized Laguerre polynomials:
    P := (n, x) -> (-1)^n*n!*LaguerreL(n, -n - x, -x):
    row := n -> seq(coeff(simplify(P(n, x)), x, k), k = 0..n):
    seq(print(row(n)), n = 0..9);
  • Python
    # recursion over rows
    from functools import cache
    @cache
    def StirlingCycleOrd2(n: int) -> list[int]:
        if n == 0: return [1]
        if n == 1: return [0, 0]
        rov: list[int] = StirlingCycleOrd2(n - 2)
        row: list[int] = StirlingCycleOrd2(n - 1) + [0]
        for k in range(1, n // 2 + 1):
            row[k] = (n - 1) * (rov[k - 1] + row[k])
        return row
    for n in range(9): print(StirlingCycleOrd2(n))
    # Alternative, using function BellMatrix from A264428.
    from math import factorial
    def f(k: int) -> int:
        return factorial(k) if k > 0 else 0
    print(BellMatrix(f, 9))

Formula

T(n, k) = Sum_{j=0..n-k} binomial(j, n - 2*k)*<>, where <> denote the second order Eulerian numbers (extending Knuth's notation).
T(n, k) = [x^n] (-x)^n * hypergeom([-n, x], [], -1/x).
T(n, k) = n!*[z^k][t^n] (exp(t)*(1 - t))^(-z). (Compare with (exp(t)/(1 - t))^z, which is the e.g.f. of the Sylvester polynomials A341101.)
T(n, k) = [x^k] (-1)^n * n! * L(n, -x - n, -x), where L(n, a, x) is the n-th generalized Laguerre polynomial.
T(n, k) = Sum_{j=0..k} binomial(n, k - j)*[n - k + j, j]*(-1)^(k - j), where [n, k] denotes the (signless) Stirling cycle numbers.
T(n, k) = (n - 1) * (T(n-2, k-1) + T(n-1, k)) with suitable boundary conditions.
T(n + k, k) = A269940(n, k), which might be called the Ward cycle numbers.