[updated to correct a typo in b, and clarify d] [and again, to refix d]

This is the right place for answers to the Teacher Edition of “Who am I?’  For discussion and questions, click here.

So I gave a three digit number to five of my friends and they all told me two facts about it. Unhappily each person gave me one correct fact and one incorrect fact. What was the number?

a1: It is the difference between two squares
a2: It is not the sum of two cubes

b1: It is an even number
b2: It does not have exactly two prime factors (it is not semiprime; ie, not of the form a*b where a and b are both prime)

c1: It is the sum of two squares
c2: It is both a square and a cube

d1: It is a product of three primes, not necessarily distinct
d2: It is prime

e1: It is the sum of a square and a cube
e2: It is the sum of three squares

Source: I think Bertie Taylor from compuserve’s old SCIMAT forum. I don’t know where Bertie took his puzzles from.

1. December 1, 2009 am31 11:35 am 11:35 am

Should b2 say “b2: It does not have exactly two prime factors (it is NOT semiprime; ie, of the form a*b where a and b are both prime)”?

2. December 1, 2009 pm31 4:56 pm 4:56 pm

Thanks for pointing out the contradiction. I believe you are correct, but I will check this evening, and update accordingly.

3. December 1, 2009 pm31 7:44 pm 7:44 pm

OK, and the ambiguities are resolved: it SHOULD say “it is not semiprime”, and by “three prime factors” it means “it is pqr where they are all prime”, not “it is a product of powers of p,q,r, all prime and distinct” (the first is a slip; the ambiguity does not affect the problem, as you can resolve it by experiment).

DO NOT READ THIS IF YOU DO NOT WANT A SOLUTION.

I proceeded as follows:

Either d1 or d2. Therefore it does not have exactly two prime factors. Therefore it is not even (b2, so not b1). So

* it is odd

Since it is odd, it is 2n+1 = (n+1)^2 – n^2. So a1 is true (not useful), and a2 is false (useful):

* it is the sum of two cubes.

But \$a^3+b^3 = (a+b)(a^2+ab+b^2)\$, so it is not prime (d2), so d1:

* it has three prime factors

If it is a square and a cube, it’s a 6th power, so it’s 729 (untenable for many reasons); so not c2, so c1:

* it is the sum of two squares

So the only pair we haven’t resolved yet is E. At this point I became idle, and found the 15 odd sums of two cubes with three digits, and factored all of them (computers, eh?). The following could be interpreted as having three prime factors:

539 = 7*7 * 11
637 = 7*7 * 13
855 = 5 * 3*3 * 19
945 = 3*3*3 * 5 * 7

Brute force reveals that only 637 is the sum of two squares. (And it has just occurred to me that I could have done this by Fermat’s Theorem on sums of two squares instantly; but I’m a fool). It is NOT the sum of a square and a cube, but is the sum of three squares in a number of ways. It, then, is our solution.

637 = 21^2 + 14^2 = 7*7*13 = 5^3 + 8^3 = 3^2 + 12^2 + 22^2