Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fixed sum of combinations

  1. Nov 28, 2013 #1
    When you have combinations where digits are 0,1,2...,m, meaning we have n=m+1 and k, is there a way to see how much of them sum up to a given number? For the sake of simplicity I have the digits 0,1,2...,7 (so n=8), and k=3. I need to find how much of these combinations WITH repetition sum up to 7. Is there a formula for this?
  2. jcsd
  3. Nov 28, 2013 #2
    By sum up, I mean the sum of all 3 digits in each combination needs to be equal to 7.
  4. Nov 29, 2013 #3

    Stephen Tashi

    User Avatar
    Science Advisor

    I don't know a formula, but there is a procedure - or at least a concise way to phrase the problem.


    [itex] (1 + x + x^2 + x^3 +x^4 + x^5 + x^6 + x^7)^3 = ? [/itex]

    and then look at the coefficient of [itex] x^7 [/itex] in the answer. The coefficient counts the number of permutations of the numbers 0,1,2...7 that add to 7. To get combinations, divide that by [itex] 3! [/itex].
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook