%I #20 Mar 31 2020 10:40:40
%S 1,2,3,6,25,6,24,343,110,10,120,6561,3375,324,15,720,161051,144400,
%T 17576,756,21,5040,4826809,7962624,1336336,64000,1521,28,40320,
%U 170859375,535387328,130691232,7595536,185193,2756,36,3628800,6975757441
%N Table T(n,k) read by upward antidiagonals. T(n,k) is the maximum value of Product_{i=1..n} Sum_{j=1..k} r[(i-1)*k+j] among all permutations r of {1..kn}.
%C A dual sequence to A331889.
%C k 1 2 3 4 5 6 7 8 9
%C --------------------------------------------------------------------------------------
%C n 1| 1 3 6 10 15 21 28 36 45
%C 2| 2 25 110 324 756 1521 2756 4624 7310
%C 3| 6 343 3375 17576 64000 185193 456533 1000000 2000376
%C 4| 24 6561 144400 1336336 7595536 31640625 106131204
%C 5| 120 161051 7962624 130691232
%C 6| 720 4826809 535387328
%C 7| 5040 170859375
%C 8| 40320 6975757441
%C 9| 3628800
%C 10| 39916800
%H Chai Wah Wu, <a href="https://arxiv.org/abs/2002.10514">On rearrangement inequalities for multiple sequences</a>, arXiv:2002.10514 [math.CO], 2020.
%F T(n,k) <= floor((k*(k*n+1)/2)^n) with equality if k = 2*t+n*u for nonnegative integers t and u.
%F T(n,1) = n! = A000142(n).
%F T(1,k) = k*(k+1)/2 = A000217(k).
%F T(n,2) = (2*n+1)^n = A085527(n).
%F If n is even, k is odd and k >= n-1, then T(n,k) = ((k^2*(k*n+1)^2-1)/4)^(n/2).
%o (Python)
%o from itertools import combinations, permutations
%o from sympy import factorial
%o def T(n,k): # T(n,k) for A333420
%o if k == 1:
%o return int(factorial(n))
%o if n == 1:
%o return k*(k+1)//2
%o if k % 2 == 0 or (k >= n-1 and n % 2 == 1):
%o return (k*(k*n+1)//2)**n
%o if k >= n-1 and n % 2 == 0 and k % 2 == 1:
%o return ((k**2*(k*n+1)**2-1)//4)**(n//2)
%o nk = n*k
%o nktuple = tuple(range(1,nk+1))
%o nkset = set(nktuple)
%o count = 0
%o for firsttuple in combinations(nktuple,n):
%o nexttupleset = nkset-set(firsttuple)
%o for s in permutations(sorted(nexttupleset),nk-2*n):
%o llist = sorted(nexttupleset-set(s),reverse=True)
%o t = list(firsttuple)
%o for i in range(0,k-2):
%o itn = i*n
%o for j in range(n):
%o t[j] += s[itn+j]
%o t.sort()
%o w = 1
%o for i in range(n):
%o w *= llist[i]+t[i]
%o if w > count:
%o count = w
%o return count
%Y Cf. A000142, A000217, A085527, A331889.
%K nonn,more,tabl
%O 1,2
%A _Chai Wah Wu_, Mar 23 2020