Welcome to NRICH.

 
Number of solutions of x+y+z=n

By Amani T on Tuesday, September 25, 2001 - 07:49 pm:

Hi Can someone plz help me get further on this certain investigation.

The Question is:

x,y and z are (not necessarily distinct) integers greater than 0. How many distinct ordered triples (x,y,z) are there for a given sum of x,y and z?

I have found that for (x,y,z)=3 there is only one way of getting the 3, this is (1,1,1)..

(x,y,z)=4 There is 3 possible solutions...
(x,y,z)=5 There is 6 possible solutions..
(x,y,z)=6 There is 10 possible solutions..
(x,y,z)=7 There is 15 possible solutions...
(x,y,z)=8 There is 21 possible solutions..

It is apparent that the solutions are triangle numbers.. but now i want a formula which gives me the number of solutions for any given sum.. Can anyone Help??

And if anyone can help me explain it even further.. by investigating where there is a formula which works for not just triples but for quadruples, quintuples..etc?

Thank You :)
Amani

By Arun Iyer on Tuesday, September 25, 2001 - 08:12 pm:

i am not sure if this is what you are asking...
if (x,y,z)=n then there are [(n-1)(n-2)/2] possible solutions.

For your next question,
i need to have a look into it!!!
will get back later!!!

love arun

By David Loeffler on Friday, October 05, 2001 - 05:57 pm:

Suppose the first number in a quadruple is one; how many ways can we fill the remainder of the quadruple? How many if the first is 2, or 3?

Think about this for a while; it might help.

David

By Martin Cohen on Sunday, February 24, 2002 - 01:16 pm:

The solution for n is n×(n-1)/2. This applies for all n except for n=3, which is a degenerate case. The explanation requires knowledge of combinatorics. You can find a discussion of elementary combinarorics at my Web site http://wwww.mathed.org/joyof.html. The general equation that will be used is the number of ways of choosing k objects out of n = C(n,k)=n!/(k!(n-k)!). The definition of n! is given by n! = n×(n-1)×(n-2)×...×1.

First consider the number of ways of getting a getting a sum of 3 numbers where we allow the numbers to be ³ 0. This is equivalent to finding the number of ways of placing two partitions among n objects. Since there are n+2 objects (including the two partitions), the number of partitions is C(n+2, 2).

For the case where each number must be ³ 1, subtract 3 from n and apply the above formula to n-3 to get C(n-1, 2) = (n-1)×(n-2)/2.