- #1
IHateFactorial
- 17
- 0
If I have a number n and I want to know all the unique ways in which I can use u addends to get that number... How do I do it?
For example: If the number is 6 and I want to see how many unique ways I can add up to it (order matters: \(\displaystyle 1 + 1 + 2 + 2\ne 2 + 2 + 1 + 1\)) by using 4 addends, what's the formula? (This is, in fact, considering that all the addends are greater than 0 and whole numbers.)
I can do it by looking for each unique way to add up to n using u addends and then factoring in the number of ways each can be permutated, including repeated numbers, but that seems too tedious.
For example: If the number is 6 and I want to see how many unique ways I can add up to it (order matters: \(\displaystyle 1 + 1 + 2 + 2\ne 2 + 2 + 1 + 1\)) by using 4 addends, what's the formula? (This is, in fact, considering that all the addends are greater than 0 and whole numbers.)
I can do it by looking for each unique way to add up to n using u addends and then factoring in the number of ways each can be permutated, including repeated numbers, but that seems too tedious.