If $x$, $y$, $x+y$, and $x-y$ are prime numbers, what is their sum?

Note that $x>y$, since $x-y$ is positive. Since $x$ and $y$ are both prime, this means that $x$ must be greater than $2$ and therefore odd. If $y$ were odd, $x+y$ would be an even number greater than $2$ and hence not prime. Thus, $y$ must be even, i.e., $y=2$.

Now we want an odd prime $x$ such that $x-2$ and $x+2$ are both prime. In other words, we want three consecutive odd numbers that are all prime. But one of $x-2,x$, and $x+2$ is divisible by $3$, so in order to be a prime it must be $3$. Clearly that one must be $x-2$, the smallest of the three numbers, and we have our unique solution: $x=5$ and $y=2$, and $x+y+(x+y)+(x-y)=3x+y=17$.


Clearly $x>y$, since otherwise $x-y<0$ and therefore is not a prime.

Now since $x>y\ge2$, $x$ must be odd. Now $y$ must be even (i.e. 2) since if not $x+y$ is even and not prime.

The only set $\{x-2,x,x+2\}$ that consists of primes occurs when $x=5$. To see this, note that $\{x-2,x,x+2\}$ contains exactly $1$ number that is a multiple of $3$, so the multiple of $3$ in the set must be $3$ itself in order to be prime.


Note that one of $x$ and $y$ has to be even, as if $x$ and $y$ are both odd, $x+y$ and $x-y$ are even, and there is only one even positive prime. As $x - y > 0$, we have $x > y$ and hence, as $2$ is the only even prime and the smallest prime, we have $y = 2$. No $x-2$, $x$ and $x+2$ are prime. But one of them is divisible by $3$: If $x$ has remainder 1 modulo 3, $x+2$ is divisible by 3, and if the remainder is 2, $x-2$ is. So, as $x-2$ is the smallest of the three numbers, we must have $x = 5$ (there is only one positive prime divisible by 3).