login
Table read by antidiagonals: T(m,n) gives the ordinal number in the table of permutations of length n+1 of the permutation which reverses the first m+1 items on a list of length n+1, leaving the remaining items unaltered. For example, T(5,7) is 28494 and the 28494th row of the permutation table of order 8 is 5 4 3 2 1 0 6 7.
1

%I #7 Apr 18 2013 10:56:33

%S 1,2,0,6,5,0,24,14,0,0,120,54,23,0,0,720,264,86,0,0,0,5040,1560,414,

%T 119,0,0,0,40320,10800,2424,566,0,0,0,0,85680,16680,3294,719,0,0,0,

%U 131760,22584,4166,0,0,0,177960,28494,5039,0,0,224184,34406,0,0,270414,40319,0

%N Table read by antidiagonals: T(m,n) gives the ordinal number in the table of permutations of length n+1 of the permutation which reverses the first m+1 items on a list of length n+1, leaving the remaining items unaltered. For example, T(5,7) is 28494 and the 28494th row of the permutation table of order 8 is 5 4 3 2 1 0 6 7.

%C The first 8 rows and columns of T are:

%C 1 2 6 24 120 720 5040 40320

%C 0 5 14 54 264 1560 10800 85680

%C 0 0 23 86 414 2424 16680 131760

%C 0 0 0 119 566 3294 22584 177960

%C 0 0 0 0 719 4166 28494 224184

%C 0 0 0 0 0 5039 34406 270414

%C 0 0 0 0 0 0 40319 316646

%C 0 0 0 0 0 0 0 362879

%F T(m, n) is given by the dot product of (m, m-1, m-2, ..., 1) and (n!, (n-1)!, ..., (1+n-m)!).

%e 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.

%o 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.

%Y See A100630 for another version.

%K easy,nonn,tabl

%O 1,2

%A Eugene McDonnell (eemcd(AT)mac.com), Dec 10 2004