Find all primes which can be written both as a sum of two primes and as a difference of two primes.
Brazilian Mathematical Olympiad
Solution
The smallest prime is , so it cannot be written as the sum of two primes. All other primes are odd, so if can be written as the sum of two primes and the difference of two primes, then in each case one of the primes must be . Thus we have for some primes .
If , then is a multiple of , so must be . But then , which is not a prime. So there are no solutions with . If , then is a multiple of , so must be , but then , which is not a prime. So there are no solutions with . Hence must be a multiple of . But is prime, so must be . Hence and .
Want a route through all this instead of an archive? The track
puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.