In how many ways can you arrange numbers 1,2,3 in such a way that their sum is equal to 40?
Its length has to be from 14 {3,3,...3,3,1} to 40 {1,1,1,...,1,1,1}
Any formula to calculate that?
So for example the first possibilities are:
14
>{3,3,3,3,3,3,3,3,3,3,3,3,3,1}
>{3,3,3,3,3,3,3,3,3,3,3,3,2,2}
15
>{3,3,3,3,3,3,3,3,3,3,3,2,2,2,1} (and I think that's it?)
16
>{3,3,3,3,3,3,3,3,3,3,3,2,2,1,1,1}
etc.
how to count them all quickly?