A remote island consists of three types of inhabitants. The liars always lie about everything, knights who always tell the truth and, knaves who strictly alternate between lying and telling the truth.
Frank, who is an inhabitant from a nearby island was visiting four acquaintances Abe, Ben, Cal and Don, each of whom are known to Frank to be knaves. Frank wants to meet the newly elected headman at his house. Accordingly, he inquires about the headman’s house number from each of his four acquaintances. They say:
Abe
1. It is the sum of squares of two distinct positive integers.
2. It does not have any repeating digits.
Ben
1. It is even.
2. It has exactly two digits.
Cal
1. It is a prime number.
2. It is one less than a triangular number.
Don
1. It has exactly one digit.
2. It is the product of consecutive prime numbers.
Determine the headman’s house number from these statements.
If it has exactly one digit (D1), then it is even (B2 false, B1 true). That even number can't be 2, as then both C1 and C2 would be true. But it can't be 4, 6 or 8 either as then both C1 and C2 would be false.
So it has more than one digit and is the product of consecutive primes, and is therefore odd, and so does have exactly two digits (B1 false, so B2 true).
As it is the product of two primes (if it were the product of three consecutive primes it would be at least 3*5*7=105, a 3digit number) it is not itself prime (C1 false) and is thus one less than a triangular number (C2 true).
Triangular nos.: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91
One less: 0, 2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90
The 2digit products of two successive primes are:
3*5 = 15
5*7 = 35
7*11 = 77
Each of 35 and 77 is one less than a triangular number.
Checking if the sum of two squares (A1), we need subtract squares from the number to see if difference is a square:
35  1 = 34
35  4 = 31
35  9 = 26
35  16 = 19
None of these differences is a square. We needn't check beyond 35/2.
For 35, A1 is false and A2 is true.
Looks good for 35, but let's check that 77 fails:
77  1 = 78
77  4 = 73
77  9 = 68
77  16 = 61
77  25 = 52
77  36 = 41
For 77, both A1 and A2 are false.
The answer is 35.

Posted by Charlie
on 20121101 17:14:48 