Mr. X and Mr. Y live in the same avenue with only 9 houses between them. The number on their houses were both prime, and Mr. X found that he could express the number of his house as the sum of the squares of the digits of Mr. y's house number.
What were their house numbers ?
Mr Y lives at a, ab or abc (cannot live in a 4-digit house since the sum of the squares of the digits is 3 figures maximum)
So Mr X lives at a^2, (a^2 + b^2), (a^2 + b^2 + c^2)
a^2 can never be prime so the 1 digit case fails.
2 digit case (Mr Y at ab)
ab is prime –> odd –> b is odd
(a^2 + b^2) is prime -> odd, b we know is odd, so b^2 is odd, making a^2 (and therefore a) even.
a…a^2…b…b^2
2…..4….3…..9
4….16…5…..25
6….36…7…..49
8….64…9…..81
Only prime choices for ab (Mr Y) are
23, 43, 47, 67, 83, 89
Disregard 89 (since 8^2+9^2 is three figures)
So Mr X lives at one of these;
33, 53, 57, 77, 93, (if he lives up the street by 10)
13, 33, 37, 57, 73, (if he lives down the street by 10)
And Mr Y at
23, 43, 47, 83
Finally since Mr X lives at (a^2 + b^2), he lives at
13, 25, 65, 73
and only 13 and 73 are prime (which means he lives down the street with Mr Y at 23 or 83)
3 digit case (fails quickly)
Mr Y at abc
Mr X at (a^2 + b^2 + c^2)
a is clearly 1 (since (a^2 + b^2 + c^2)<244 and (a^2 + b^2 + c^2)<200 if a=2)
abc is prime, therefore c is odd
for (1+ b^2 + c^2), with c odd, b must be odd.
Max for (1+ b^2 + c^2) = 163 (b,c, both 9)
So b<6
b>3 (since (1+ 9 + c^2)<100)
So b = 5 and c must equal 9 to have (1+ 25 + c^2) >100
But (1+ 5^2 + 9^2) does not equal 159
Mr Y lives at 83 with Mr X at 73
or
Mr Y lives at 23 with Mr X at 13
|
Posted by Lee
on 2003-12-02 23:38:06 |