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 in house number 11 and Mr. X in house number 2. As the problem requires, both numbers are prime and the difference between the two is 11 - 2 = 9. In addition, the sum of the squares of the two digits in Mr. Y's number (1 squared + 1 squared) is equal to Mr. X's number.