OFFSET
1,2
COMMENTS
The problem is to maximize Sum_{i=1..n} i p(i) - Max_{j=1..n} j p(j) where p is a permutation of {1,...,n}.
The terms up to n = 100 were computed via integer linear programming.
LINKS
Rob Pratt, Table of n, a(n) for n = 1..100
CodeForces, Another Permutation Problem
Mathematics Stack Exchange, Maximise ... with p permutation of size n.
MathOverflow, Maximizing a sum minus its maximal summand
EXAMPLE
For n = 4, the best permutation is [1, 4, 3, 2], with a(4) = (1*1+2*4+3*3+4*2) - max(1*1,2*4,3*3,4*2) = 26 - 9 = 17.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rob Pratt, Nov 10 2023
STATUS
approved