OFFSET
1,2
COMMENTS
The first 8 rows and columns of T are:
1 2 6 24 120 720 5040 40320
0 5 14 54 264 1560 10800 85680
0 0 23 86 414 2424 16680 131760
0 0 0 119 566 3294 22584 177960
0 0 0 0 719 4166 28494 224184
0 0 0 0 0 5039 34406 270414
0 0 0 0 0 0 40319 316646
0 0 0 0 0 0 0 362879
FORMULA
T(m, n) is given by the dot product of (m, m-1, m-2, ..., 1) and (n!, (n-1)!, ..., (1+n-m)!).
EXAMPLE
T(5,7) is 28494 because we can write (5,4,3,2,1) dot (7!,6!,5!,4!.3!), or (5,4,3,2,1) dot (5040,720,120,24,6) or 28494.
PROG
In Iverson's J language, the program can be written functionally, in Backus's sense: F100711 =: ( [: (- i.) [ ) ( +/ .* ! ) ] ( - i. ) [ ) (- i. 5) is 5 4 3 2 1; (7 (- i.) 5) is 7 6 5 4 3 5 4 3 2 1 (+ / . * !) 7 6 5 4 3 is the dot product of the left argument with the factorials of the right argument, or 28494. So 5 F100711 7 will be 28494.
CROSSREFS
KEYWORD
AUTHOR
Eugene McDonnell (eemcd(AT)mac.com), Dec 10 2004
STATUS
approved