What's the easiest way to calculate all combinations of numbers, in sets of 5, that eqaul n. For instance, say n=20. Sum combinations would include:
20+0+0+0+0
19+1+0+0+0
....
5+5+5+5+0
....etc
Is there a mathmatical formula that would lead me to those sums without going through all combinations individually? I'm not a math whiz, so details will be GREATLY appreciated.
Please let me know if you have any further questions!
Thanks!
--Dan
2006-09-01
06:37:06
·
4 answers
·
asked by
danstevens
1
in
Science & Mathematics
➔ Mathematics
I will be writing a program - I just want to know the math to write the program most efficiently.
2006-09-01
06:59:31 ·
update #1