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.

A330609 T(n, k) = binomial(n-k-1, k-1)*(n-k)!/k! for n >= 0 and 0 <= k <= floor(n/2). Irregular triangle read by rows.

Original entry on oeis.org

1, 0, 0, 1, 0, 2, 0, 6, 1, 0, 24, 6, 0, 120, 36, 1, 0, 720, 240, 12, 0, 5040, 1800, 120, 1, 0, 40320, 15120, 1200, 20, 0, 362880, 141120, 12600, 300, 1, 0, 3628800, 1451520, 141120, 4200, 30, 0, 39916800, 16329600, 1693440, 58800, 630, 1
Offset: 0

Views

Author

Peter Luschny, Dec 27 2019

Keywords

Comments

Also the antidiagonals of the Lah triangle A271703.

Examples

			Triangle begins:
[0] 1
[1] 0
[2] 0, 1
[3] 0, 2
[4] 0, 6,     1
[5] 0, 24,    6
[6] 0, 120,   36,    1
[7] 0, 720,   240,   12
[8] 0, 5040,  1800,  120,  1
[9] 0, 40320, 15120, 1200, 20
		

Crossrefs

Variants: A180047, A221913. Row sums: A001053.
Cf. A271703.

Programs

  • Maple
    T := (n, k) -> binomial(n-k-1, k-1)*(n-k)!/k!:
    seq(seq(T(n, k), k=0..floor(n/2)), n=0..12);
    # Alternative:
    T := proc(n, k) option remember;
    if (n=0 and k=0) or (n=2 and k=1) then 1 elif (k < 1) or (k > ceil(n/2)) then 0
    else (n-1)*T(n-1, k) + T(n-2, k-1) fi end: seq(seq(T(n, k), k=0..n/2), n=0..12);
  • Mathematica
    Table[Binomial[n-k-1,k-1] (n-k)!/k!,{n,0,20},{k,0,Floor[n/2]}]//Flatten (* Harvey P. Dale, Oct 19 2021 *)

Formula

T(0,0) = T(2,1) = 1. If k < 1 or k > ceiling(n/2) then T(n,k) = 0. Otherwise:
T(n, k) = (n-1)*T(n-1, k) + T(n-2, k-1)