Find the number of triplets of positive integers which sum up to 2006?

That is, find all solutions of a+b+c = 2006, with a,b,c in N* without double counting.
(e.g. 2003,2,1 and 1,2003,2 are not to be counted as different solutions.)

Scythian19502010-04-09T17:24:07Z

Favorite Answer

The total number of ordered partitions is (2005)(2004) / 2 = 2009010. Out of those, 3(1002) = 3006 involve duplication of an integer (triplication of any integer is impossible), leaving 2006004 instances where all 3 integers are different. We eliminate 5/6 of 2006004 as being redundant, leaving 334334. We add to that 1/3 of 3006 cases of duplicated integers to end up with 335336 distinct unordered partitions.

This is assuming that 0 is not part of any set of positive integers.

Jerry2010-04-10T00:17:28Z

Not a totally satisfying solution, but perhaps helpful.

Assume a < b < c. Prevents duplicate solutions and does no harm.
You can then develop some other constraints.
a < 668 ( because 668+669+670 = 2007, so already too large)
b < 1003 ( because 1+1003+1004 = 2008, ...)
a + b < 1336, and thus, b < 1336 -a
Observe that as a gets larger, the second constraint on b is the binding constraint.
c = 2006 - a - b. Just one possibility for each valid a+b.

At this point, I got a bit lazy and shifted to a simple Excel sheet
(a, bmin, bmax, b possibilities) and came up with 390,278

Albundy2010-04-09T21:27:50Z

667.666+668.666+669.666.