A nice way to find all combinations that give a sum of N?
<p>Is there a nice way for generating a list of digits (0-9), with repetitions and a length of 6, such that the sum is N, say, 20. For example:</p>

<pre><code>004673 -&gt; 4+6+7+3=20
121673 -&gt; 1+2+1+6+7+3=20
...
</code></pre>

<p>Thanks</p>
