# Thread: how many ways are there to add 3 numbers to get a bigger integer

1. ## how many ways are there to add 3 numbers to get a bigger integer

Hi there,
I'm trying to achieve the number of ways you can add three numbers x, y and z to be equal to a given integer.

For example, let's say the given integer is 10.
so I need to know how many ways are there to add up three numbers x, y and z to be equal to 10?

x+y+z = 10. The values of x, y and z would have to be either a positive whole number, or only a decimal number with .5

Some of the ways are 1) x=0, y=0, z=10 2) x=0, y=5, z=5 3) x=4.5, y=4.5, z = 1. This list can go on, but will still be infinite given that u can only use either a positive whole number or a decimal number with only .5 such as 0.5, 5.5, 9.5 etc.

Do you think is it possible? If so, is there a general way to achieve this for any given integer rather than just 10?

2. Do you want the number of non negative integral solutions to, say,

$x_{1}+x_{2}+x_{3}=10$?.

If so, we can do a change of variables.

Let $y_{1}=x_{1}-1, \;\ y_{2}=x_{2}-1, \;\ y_{3}=x_{3}-1$

This gives us $y_{1}+y_{2}+y_{3}=7$

$\binom{7+3-1}{7}=\binom{9}{7}=36$

The number of integral solutions without restriction would be

$\binom{10+3-1}{10}=\binom{12}{10}=66$

3. Originally Posted by dgmath
Hi there,
I'm trying to achieve the number of ways you can add three numbers x, y and z to be equal to a given integer.
For example, let's say the given integer is 10.
so I need to know how many ways are there to add up three numbers x, y and z to be equal to 10?
x+y+z = 10. The values of x, y and z would have to be either a positive whole number, or only a decimal number with .5
Some of the ways are 1) x=0, y=0, z=10 2) x=0, y=5, z=5 3) x=4.5, y=4.5, z = 1. This list can go on, but will still be infinite given that u can only use either a positive whole number or a decimal number with only .5 such as 0.5, 5.5, 9.5 etc.
There is one major fact you did not explain.
Do you consider $x=4.5,~y=4.5,~z=1$ to be different from $x=1,~y=4.5,~z=4.5$.

The answer to this depends upon knowing if these are the same or different.
Once you tell us that then we can give a general solution for any N and any number of terms in the sum.

4. Do you consider to be different from .

Plato,
yes, they're different from eachother.

5. Originally Posted by galactus
Do you want the number of non negative integral solutions to, say,

$x_{1}+x_{2}+x_{3}=10$?.

If so, we can do a change of variables.
I'm not quite sure what you meant by that. Can you please rephrase it for me? Thanks.

6. Originally Posted by dgmath
yes, they're different from eachother.
Then the answer is easy: $\binom{20+3-1}{20}=\binom{22}{2}=\frac{22\cdot 21}{2}$

To explain. That is the number of non-negative integral solutions to $x+y+z=20$.
If we divide each of those solutions by two we get one of your solutions.
Example: $7+4+9=20$ so $3.5+2+4.5=10$

So for a general solution.
If N is a positive integer and we want to count the number of ways to add k non-negative integers or numbers with the decimal part .5 to get N, the idea is the same as above.
$\binom{2N+k-1}{2N}$

7. Originally Posted by Plato
Then the answer is easy: $\binom{20+3-1}{20}=\binom{22}{2}=\frac{22\cdot 21}{2}$

To explain. That is the number of non-negative integral solutions to $x+y+z=20$.
If we divide each of those solutions by two we get one of your solutions.
Example: $7+4+9=20$ so $3.5+2+4.5=10$

So for a general solution.
If N is a positive integer and we want to count the number of ways to add k non-negative integers or numbers with the decimal part .5 to get N, the idea is the same as above.
$\binom{2N+k-1}{2N}$
Yes! That is exactly what I was looking for. thanks bunch!