Find the sum of all primes that can be written both as a sum of two primes and as a difference of two primes.
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.
Let the prime in question (i.e. the one that is both a sum of two primes and a difference of two primes) be denoted by p.
Since the problem talked about sums and differences of primes, the first thing that came to mind was that all primes except 2 are odd. If two odd primes are added together, then their sum is even, and since the sum is clearly bigger than 2, it cannot be prime. This implies that p must be of the form q + 2, where q is an odd prime.
Similarly, if one odd prime is subtracted from another, the difference must be even. Hence, in order for the difference to be a prime, it must be 2. However, p cannot be 2 since p is also the sum of two primes. This implies that p must be of the form r - 2, where r is an odd prime.
Putting this all together, we find that p-2, p and p+2 must all be prime numbers. However, anyone who’s listed out primes before will know that 3 primes cannot occur so closely to each other like that: one of them will definitely be divisible by 3*. Hence, the only way all 3 of them could possibly be prime is if the number divisible by 3 is 3 itself, i.e. p = 5.
Since 5 = 3 + 2 and 5 = 7 – 2, 5 indeed is the only prime that can be written both as the sum of two primes and as a difference of two primes.