Optimizing a Sequence to Minimize a Custom Score Function Involving Summation and Sequence Length
Idk how to proof, but the sequence of {1,2,3,…,N} can form any numbers between 1 and (1+N)N/2. Therefore, if a=1, the optimal sequence should be {1,2,3,…,x} where argminx (1+x)x/2 >= target