Given an array of \$n\$ positive integers we will say its self-sum order is the number of ways to add elements from it to make \$n\$. We will count ways as distinct up to associativity. So \$1+(2+3)\$ and \$(1+2)+3\$ are not counted as separate ways to make 6, but \$2+4\$ and \$4+2\$ are counted as separate. Two sums are the same if they are the same when written without parentheses.
You may not reuse elements of the array in your sum, but the same number can appear multiple times in the array. So if the array is [1,1,2,3], then \$1+1+2\$ should be counted, but \$2+2\$ should not.
As an example here's one array with all the distinct sums listed out:
[1,1,2,3]
1+3
3+1
1+1+2
1+2+1
2+1+1
It's self sum order is 5.
Task
Given a non-negative integer, \$n\$, as input, output the array of length \$n\$ with the highest self-sum order. Since there will be multiple arrays (often just permutations of the same array) with the highest self-sum order, you may output any one of them.
Your answer will be scored by it's big \$O\$ asymptotic time complexity in terms of \$n\$, with faster algorithms being better.
Example outputs:
You do not need to output the order it is included for your convenience.
0 -> 1 []
1 -> 1 [1]
2 -> 1 [1,1]
3 -> 3 [1,2,3]
4 -> 5 [1,1,2,3]
5 -> 9 [1,1,1,2,3]
6 -> 17 [1,1,2,2,3,4]
7 -> 37 [1,1,1,2,2,3,4]
8 -> 73 [1,1,1,1,2,2,3,4]
9 -> 138 [1,1,1,1,2,2,3,4,5]
10 -> 279 [1,1,1,1,2,2,2,3,4,5]
11 -> 578 [1,1,1,1,2,2,2,3,3,4,5]
12 -> 1228 [1,1,1,1,1,2,2,2,3,3,4,5]
13 -> 2475 [1,1,1,1,1,1,2,2,2,3,3,4,5]
14 -> 4970 [1,1,1,1,1,1,2,2,2,3,3,4,5,6]
These cases were generated by a computer program, there is a chance there is an error. If you believe that there is an error, just let me know.