7
$\begingroup$

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\}$.

  • 1
    I suspect you mean two *different* sets?2011-05-12
  • 1
    @Cogicero: why?2011-05-12
  • 0
    @Joriki: Yes, two different sets. let me edit the OP2011-05-12
  • 0
    @Gerry Myerson: :) Its a smaller component of a tougher one I have been wrapping my mind around. Any ideas?2011-05-12
  • 0
    @Cogicero: Your edit still doesn't say that $(A,B,C)\neq(X,Y,Z)$.2011-05-12
  • 0
    @Joriki: Thanks. Now it does.2011-05-12
  • 0
    If all 6 numbers have to be distinct then there are 216 possibilities; one of which is (3,4,12) and (8,9,2).2011-05-12
  • 0
    If the numbers have to be different within each set, there are only 455 possibilities. I find 9 pairs by brute force search in Excel2011-05-12
  • 0
    @Shahab: but the numbers have to be greater than 2.2011-05-12
  • 0
    @Ross: Please how did you find that using Excel? Thanks2011-05-12

2 Answers 2

6

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.

  • 0
    I got more. These arent all such triples.2011-05-12
  • 0
    @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 22011-05-12
  • 0
    I get the same set of 92011-05-12
  • 0
    Oh! Sorry, you are correct....I was taking 2 and 18 inclusive.2011-05-12
  • 0
    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?2011-05-12
  • 0
    @Cogicero: I don't think there is any way of solving this manually that is significantly different from brute force. (Of course you can prune your list of options considerably, but it will still be a case-by-case / trial-and-error method.)2011-05-12
  • 0
    Thanks a lot, ShreevatsaR. I have accepted your answer. I wondered if this cannot be solved using some graphs of inequalities or something...2011-05-12
  • 0
    And this is one more reason I will learn Python :)2011-05-12
4

How to in Excel: Make a table with 455 lines, one for each set of 3 numbers. Start with a column from 4 through 17 (use Fill Series to make it) and put 2 and 3 in the next two columns. Then copy everything except the first line and change the 3 to a 4. With copy and fill down to make the changes it takes about 2 min. This was columns A, B, and C. Then make column D the sum and E the product. To find the duplicates, column F=E^2+D (think of the Cantor pairing function) and sort on column F. In G1, put =F2-F1 and copy down and you will find pairs in column F by zeros in column G.

Added after comment: The first part is just to get all possibilities into columns ABC of 455 lines. One could write some equations to do this, or type them in, or use this compromise. If I am iterating more than 2000 or so, I go to Python, but under that Excel is my tool of choice. Then in column D goes the sum of ABC and in E the product. Now we have to find a way to find the matches. You could just sort the whole matrix on column D and then on E, but combining the two into F does it with one sort. Then you still want to make the matches visible and putting the difference into G does that.

  • 0
    Thanks Ross. Unfortunately I didn't quite get it when I tried the method described above. I might just be slow with Excel.2011-05-12