cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A331889 Table T(n,k) read by upward antidiagonals. T(n,k) is the minimum value of Sum_{i=1..n} Product_{j=1..k} r[(i-1)*k+j] among all permutations r of {1..kn}.

This page as a plain text file.
%I A331889 #25 Jul 24 2023 04:53:42
%S A331889 1,3,2,6,10,6,10,28,54,24,15,60,214,402,120,21,110,594,2348,3810,720,
%T A331889 28,182,1334,8556,32808,43776,5040,36,280,2614
%N A331889 Table T(n,k) read by upward antidiagonals. T(n,k) is the minimum value of Sum_{i=1..n} Product_{j=1..k} r[(i-1)*k+j] among all permutations r of {1..kn}.
%C A331889    k    1   2     3     4     5     6     7     8      9      10       11        12
%C A331889   ---------------------------------------------------------------------------------
%C A331889 n  1|   1   2     6    24   120   720  5040 40320 362880 3628800 39916800 479001600
%C A331889    2|   3  10    54   402  3810 43776
%C A331889    3|   6  28   214  2348 32808
%C A331889    4|  10  60   594  8556
%C A331889    5|  15 110  1334
%C A331889    6|  21 182  2614
%C A331889    7|  28 280
%C A331889    8|  36 408
%C A331889    9|  45 570
%C A331889   10|  55 770
%H A331889 Chai Wah Wu, <a href="https://arxiv.org/abs/2002.10514">On rearrangement inequalities for multiple sequences</a>, arXiv:2002.10514 [math.CO], 2020-2022.
%F A331889 T(n,k) >= ceiling(n*((kn)!)^(1/n)).
%F A331889 T(n,1) = n*(n+1)/2 = A000217(n).
%F A331889 T(1,k) = k! = A000142(k).
%F A331889 T(n,3) = A072368(n).
%F A331889 T(n,2) = n*(n+1)*(2*n+1)/3 = A006331(n).
%o A331889 (Python)
%o A331889 from itertools import combinations, permutations
%o A331889 from sympy import factorial
%o A331889 def T(n,k): # T(n,k) for A331889
%o A331889     if k == 1:
%o A331889         return n*(n+1)//2
%o A331889     if n == 1:
%o A331889         return int(factorial(k))
%o A331889     if k == 2:
%o A331889         return n*(n+1)*(2*n+1)//3
%o A331889     nk = n*k
%o A331889     nktuple = tuple(range(1,nk+1))
%o A331889     nkset = set(nktuple)
%o A331889     count = int(factorial(nk))
%o A331889     for firsttuple in combinations(nktuple,n):
%o A331889         nexttupleset = nkset-set(firsttuple)
%o A331889         for s in permutations(sorted(nexttupleset),nk-2*n):
%o A331889             llist = sorted(nexttupleset-set(s),reverse=True)
%o A331889             t = list(firsttuple)
%o A331889             for i in range(0,k-2):
%o A331889                 itn = i*n
%o A331889                 for j in range(n):
%o A331889                         t[j] *= s[itn+j]
%o A331889             t.sort()
%o A331889             v = 0
%o A331889             for i in range(n):
%o A331889                 v += llist[i]*t[i]
%o A331889             if v < count:
%o A331889                 count = v
%o A331889     return count
%Y A331889 Cf. A000142, A000217, A006331, A072368.
%K A331889 nonn,more,tabl
%O A331889 1,2
%A A331889 _Chai Wah Wu_, Mar 20 2020