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.

A333420 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}.

Original entry on oeis.org

1, 2, 3, 6, 25, 6, 24, 343, 110, 10, 120, 6561, 3375, 324, 15, 720, 161051, 144400, 17576, 756, 21, 5040, 4826809, 7962624, 1336336, 64000, 1521, 28, 40320, 170859375, 535387328, 130691232, 7595536, 185193, 2756, 36, 3628800, 6975757441
Offset: 1

Views

Author

Chai Wah Wu, Mar 23 2020

Keywords

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

Crossrefs

Programs

  • 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

Formula

T(n,k) <= floor((k*(k*n+1)/2)^n) with equality if k = 2*t+n*u for nonnegative integers t and u.
T(n,1) = n! = A000142(n).
T(1,k) = k*(k+1)/2 = A000217(k).
T(n,2) = (2*n+1)^n = A085527(n).
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).