Suppose your numbers are $a,b,c,d$ and $a < b < c < d$ and the number you want to fit them into is $N$.
Let $P(N; d,c,b,a)$ be the best strategy where you must use each number at least once.
Well, if you must use each number at least once, that's the same as fitting them into $N - (a+b+c+d)$ where you don't have to use each number at least once and then using each one one more time. Call that $B(M; d,c,b,a)$ where $M = N-(a,b,c,d)$.
Now to minimize the number of uses we should maximize the use of the of the largest number $d$. There is a maximum number of times that $d$ goes into $M$. It is $k=\lfloor \frac Md\rfloor$. If we can then do $B(M- kd, c,b,a)$ we will be done. If we can't we are not done and have to try $B(M-(k-1)d, c,b,a)$ until we find one that works.
Example: If our numbers are $8,10,15,24$ and we want to fit then into $213$ we use them each once to get $8+10+15+24= 57$ and $213 -57 = 156$ and try to figure $B(156; 24,15,10,8)$.
$24$ goes into $156$ six times and $156-6*24 = 12$. So we want so see if we can do $B(12; 15, 10,8)$. $15$ goes into $12$ zero times so we want to see if we can do $B(12; 10, 8)$.
$10$ goes into $12$ once and $12 -10 = 2$ so we want to see if we can do $B(2;8)$ as $8 > 2$ we can not.
So we go back to trying to figuring out $B(12;10,8)$ but instead of $10$ going into $12$ once, we have it go in zero times. So we want to figure $B(12;8)$ and $8$ goeis into $12$ once. So we want $B(4,8)$ but $8>4$ so we can't.
So we go back to $B(156; 24, 15,10,8)$ but now consider $24$ going into $156$ only $5$ times. $5*24= 120$ and $156-120= 36$. So we want to solve $B(36; 15,10, 8)$.
$15$ goes into $36$ two times. $36-2*15 = 6$ so we want $B(6;10,8)$ which is impossible as $10, 8 > 6$. So we try $15$ in $1$ times; $36-15=21$ so we want $B(31;10,8)$. $10$ goes into $21$ two times but $B(1;8)$ is impossible as is $B(11;8), B(21;8)$.
So we try $15$ in $0$ times and $B(36; 10,8)$. $10$ goes into $36$ three times but $B(6; 8)$ is impossible. So we try $10$ two times. and $B(16; 8)$ is possible!
So we hae $8$ goes in $2$ timesto get $16$ and $10$ goes in $2$ times to get $36$ and $15$ goes in $0$ times and $24$ goes in$5$ times to get $156$ then everything goes in one more time.
$213 = 6*24 + 1*15+ 3*10 + 3*8$ and $6+1+3+3= 13$ is the minimum number of uses.