|
| |
|
|
A062869
|
|
Triangle read by rows: For n >= 1, k >= 0, T(n,k) = the number of permutations pi of n such that the total distance sum_i abs(i-pi(i)) = 2k. Equivalently, k = sum_i max(i-pi(i),0).
|
|
2
| |
|
|
1, 1, 1, 1, 2, 3, 1, 3, 7, 9, 4, 1, 4, 12, 24, 35, 24, 20, 1, 5, 18, 46, 93, 137, 148, 136, 100, 36, 1, 6, 25, 76, 187, 366, 591, 744, 884, 832, 716, 360, 252, 1, 7, 33, 115, 327, 765, 1523, 2553, 3696, 4852, 5708, 5892, 5452, 4212, 2844, 1764, 576, 1, 8, 42, 164, 524
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,5
|
|
|
COMMENTS
| Number of possible values is 1,2,3,5,7,10,13,17,21,... = A033638. Maximum distance divided by 2 is the same minus one, i.e. 0,1,2,4,6,9,12,16,20,... = A002620.
Contribution from Emeric Deutsch (deutsch(AT)duke.poly.edu), Apr 02 2010: (Start)
The Maple program yields the entries of the specified row n.
(End)
|
|
|
EXAMPLE
| 1; 1,1; 1,2,3; 1,3,7,9,4; 1,4,12,24,35,24,20; ...
(4,3,1,2) has distances (3,1,2,2), sum is 8 and there are 4 other permutations of degree 4 with this sum.
|
|
|
MAPLE
| n := 9: with(combinat): P := permute(n): excsum := proc (p) (1/2)*add(abs(p[i]-i), i = 1 .. nops(p)) end proc: f[n] := sort(add(t^excsum(P[j]), j = 1 .. factorial(n))): seq(coeff(f[n], t, j), j = 0 .. floor((1/4)*n^2)); [From Emeric Deutsch (deutsch(AT)duke.poly.edu), Apr 02 2010]
|
|
|
CROSSREFS
| Cf. A062866, A062867, A062870, A072949.
Sequence in context: A059397 A152821 A071943 * A102473 A011117 A069269
Adjacent sequences: A062866 A062867 A062868 * A062870 A062871 A062872
|
|
|
KEYWORD
| nonn,tabf
|
|
|
AUTHOR
| Olivier Gerard (olivier.gerard(AT)gmail.com), Jun 26 2001
|
| |
|
|