Let be a 3-digit number such that all of the following 7 numbers are prime:
Find the sum of all possible values of .
means the three-digit number with in the hundreds placem in the tens place, and in the ones place, where are digits.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Note that two-digit primes can only end with 1 , 3 , 7 , 9 . Since all a , b , c are last digits (with a b , b c , c a for example), they must all be 1 , 3 , 7 , 9 .
The digits cannot be all among 1 and 7 , as then a b c = 1 0 0 a + 1 0 b + c ≡ a + b + c ≡ 1 + 1 + 1 ≡ 0 ( m o d 3 ) , and so a b c is divisible by 3 , impossible. Also, we cannot have two digits divisible by 3 . Suppose otherwise, that a , b are divisible by 3 , then a b is divisible by 3 by a similar argument as above. So we need at least one digit divisible by 3 (otherwise all digits are among 1 , 7 , impossible), but no more than one digit (otherwise we have at least two digits divisible by 3 , impossible).
Now, ignore the condition that a b c is prime; after we get all possible candidates for a b c , only then we check whether each is prime.
Suppose that some of the digits is 9 ; WLOG a = 9 . The only two-digit prime beginning with 9 is 9 7 . Since a b , a c are both primes, we need b = c = 7 . But then b c = 7 7 is not prime. So none of the digits is 9 . Thus the digit divisible by 3 must be a 3 .
Among the two remaining digits, we cannot have both 7 s, as that means we have a 7 7 which is not prime. However, we can check that 1 1 3 and 1 7 3 , together with permutations, satisfy the conditions that all 6 two-digit primes among them are primes. Thus we only need to check whether nine numbers are prime. Of course, this is a job for computer, because I don't feel like doing this boring task.
Thus the sum is 1 1 3 + 1 3 1 + 3 1 1 + 1 3 7 + 1 7 3 + 3 1 7 = 1 1 8 2 .