# Two sets of 3 positive integers with equal sum and product

Provide 2 different sets of 3 unique positive integers whose products are the same and the sums are also the same, with each number strictly between 2 and 18.

Edit:
Provide $\{A, B, C\}$ and $\{X, Y, Z\}$ such that $A+B+C=X+Y+Z$ and $ABC=XYZ$,
and such that the following conditions hold:

(1) $2 \lt A\lt B\lt C\lt 18$;
(2) $2\lt X\lt Y\lt Z\lt 18$; and
(3) $\{A,B,C\}\neq \{X,Y,Z\}$.

-
I suspect you mean two different sets? –  joriki May 12 '11 at 11:52
@Cogicero: why? –  Gerry Myerson May 12 '11 at 12:08
@Joriki: Yes, two different sets. let me edit the OP –  Cogicero May 12 '11 at 12:09
@Gerry Myerson: :) Its a smaller component of a tougher one I have been wrapping my mind around. Any ideas? –  Cogicero May 12 '11 at 12:10
@Cogicero: Your edit still doesn't say that $(A,B,C)\neq(X,Y,Z)$. –  joriki May 12 '11 at 12:30

I don't know if you were looking for some number-theoretic insights (or even whether any exist to be found), but a brute-force computer program can easily find all such pairs of triples:

(A, B, C)       (X, Y, Z)       (Sum, Product)
(8, 12, 15)     (9, 10, 16)     (35, 1440)
(3, 8, 10)      (4, 5, 12)      (21, 240)
(5, 9, 14)      (6, 7, 15)      (28, 630)
(4, 9, 10)      (5, 6, 12)      (23, 360)
(3, 10, 12)     (4, 6, 15)      (25, 360)
(4, 10, 14)     (5, 7, 16)      (28, 560)
(6, 10, 14)     (7, 8, 15)      (30, 840)
(4, 8, 15)      (5, 6, 16)      (27, 480)
(6, 12, 14)     (7, 9, 16)      (32, 1008)


("All" up to swapping (A,B,C) and (X,Y,Z), of course.)

Python code if anyone's interested:

ss = {} #Triples which give a certain (sum, product)
for A in range(3,18):
for B in range(A+1, 18):
for C in range(B+1, 18):
p = (A+B+C, A*B*C)
ss[p] = ss.get(p, []) + [(A,B,C)]
for p in ss:
if len(ss[p])>=2:
print ss[p], "\t", p


As for solving it manually, I don't think there is any method that is significantly different from brute force. One can prune the list of choices to consider, but it will still take exhaustive enumeration or trial-and-error to find such triples. An ad hoc method for an ad hoc problem. :-)

For instance — going by trial-and-error and blind guesswork — I might start by trying (4,5) for (A,B). Then 20C = XYZ suggests maybe trying X=10 (because all prime factors of 20 must occur somewhere on the right), after which the equations become {C=1+Y+Z, 2C=YZ}, and you know one of Y,Z must be even; Y=6 doesn't work and Y=8 happens to give a valid solution Z=3. This (after you order them correctly) is one valid pair of triples. But other guesses may lead to lots of blind alleys and backtracking, so I don't really recommend this method. Then again, I suspect there is nothing much better.

-
I got more. These arent all such triples. –  Shahab May 12 '11 at 13:17
@Shahab: Wow, really? Well, my program is short and simple enough that I'm pretty sure these are all. Can you point one triple not covered? [BTW, did you take into account that 2<A<B<C<18? Maybe you included 2 or 18, or didn't have all 3 numbers distinct…] –  ShreevatsaR May 12 '11 at 13:19
I get the same set of 9 –  Ross Millikan May 12 '11 at 13:24
Oh! Sorry, you are correct....I was taking 2 and 18 inclusive. –  Shahab May 12 '11 at 13:24
Thanks, ShreevatsaR. Yes I am looking for a number-theoretic (sic) method and not brute force. Do you have any insights on solving this manually? –  Cogicero May 12 '11 at 13:31