OFFSET
1,2
COMMENTS
A dual sequence to A331889.
k 1 2 3 4 5 6 7 8 9
--------------------------------------------------------------------------------------
n 1| 1 3 6 10 15 21 28 36 45
2| 2 25 110 324 756 1521 2756 4624 7310
3| 6 343 3375 17576 64000 185193 456533 1000000 2000376
4| 24 6561 144400 1336336 7595536 31640625 106131204
5| 120 161051 7962624 130691232
6| 720 4826809 535387328
7| 5040 170859375
8| 40320 6975757441
9| 3628800
10| 39916800
LINKS
Chai Wah Wu, On rearrangement inequalities for multiple sequences, arXiv:2002.10514 [math.CO], 2020.
FORMULA
PROG
(Python)
from itertools import combinations, permutations
from sympy import factorial
def T(n, k): # T(n, k) for A333420
if k == 1:
return int(factorial(n))
if n == 1:
return k*(k+1)//2
if k % 2 == 0 or (k >= n-1 and n % 2 == 1):
return (k*(k*n+1)//2)**n
if k >= n-1 and n % 2 == 0 and k % 2 == 1:
return ((k**2*(k*n+1)**2-1)//4)**(n//2)
nk = n*k
nktuple = tuple(range(1, nk+1))
nkset = set(nktuple)
count = 0
for firsttuple in combinations(nktuple, n):
nexttupleset = nkset-set(firsttuple)
for s in permutations(sorted(nexttupleset), nk-2*n):
llist = sorted(nexttupleset-set(s), reverse=True)
t = list(firsttuple)
for i in range(0, k-2):
itn = i*n
for j in range(n):
t[j] += s[itn+j]
t.sort()
w = 1
for i in range(n):
w *= llist[i]+t[i]
if w > count:
count = w
return count
CROSSREFS
KEYWORD
AUTHOR
Chai Wah Wu, Mar 23 2020
STATUS
approved