How many four integer combinations from numbers 1 to 100 equals 100

1 answer

This is a very complicated questions, unless I mis-understood the question.

I assume you mean something like this:
12 26 8 54 since 12+26+8+54 = 100

would you count 26 8 12 54 as the same combination?
If not, there would be 4! or 24 arrangements of this same combination.

I made up a rather silly computer program and ran it on my MAC

10 for a = 1 to 100
20 for b = 1 to 100
30 for c = 1 to 100
40 for d = 1 to 100
50 sum = a+b+c+d
60 if sum = 100 then count = count+1
70 next d
80 next c
90 next b
100 next a
110 print count

It gave me a total of 156,849 of them!!
(e.g. one of them was 12 26 8 54)
It would include 4! or 24 same permutations for each sum of 100 of the same 4 integers, so we should divide the 156849 by 24

But....
suppose we look at another one of them:
30 30 10 30 , which is part of my 156,849
but there are only 4!/3! or 4 possible arrangements.
Awwhhh, the complications!

btw, my dinky little program had to perform 100 million iterations to find that sum!!
Similar Questions
  1. Something plus something equals 97You have many combinations of whole numbers that answers your question. 1 + 96 2 + 95 3 + 94
    1. answers icon 0 answers
  2. I was given this by my teacher for extra credit1 _ _ _ _ _ 1 _ the blanks are numbers from 0-9 excluding 1 since it was given. I
    1. answers icon 3 answers
  3. I was given this by my teacher for extra credit1 _ _ _ _ _ 1 _ the blanks are numbers from 0-9 excluding 1 since it was given. I
    1. answers icon 0 answers
  4. How many possible combinations of alleles can di-hybrid 'Dots' produce?Four combinations Six combinations Two combinations Eight
    1. answers icon 1 answer
more similar questions