Find amount of numbers that can sum to a number

60 Views Asked by At

I'm wondering if there is a formula to determine the total amount of numbers which can add to another number. Example: What combination of $4$ numbers adds to $4$. The answer is $1 + 1 + 1 + 1$. So there is only one solution. Of course this grows considerably as numbers get bigger. For a practical test is there a way to calculate the total solutions for $4$ numbers that add to $25$. If there is how can this be adjusted for larger sets. Like $20$ numbers that add to $113$.