If $x$, $y$, $x+y$, and $x-y$ are prime numbers, what is their sum? Suppose that $x$, $y$, $x−y$, and $x+y$ are all positive prime numbers. What is the sum of the four numbers?


Well, I just guessed some values and I got the answer.
$x=5$, $y=2$, $x-y=3$, $x+y=7$. All the numbers are prime and the answer is $17$.
Suppose if the numbers were very big, I wouldn't have got the answer.
Do you know any ways to find the answer?
Note that $x&gt;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$.
If $x,y &gt; 1$ are both odd, then $x+y &gt; 2$ is even, a contradiction.
Then $y = 2$ and by inspection $x=5$ as $x = 3$ results in $x-y = 1$.
Or, we have that $x-2,x,x+2$ are all prime meaning we have three consecutive integers modulo $3$ which is only satisfied by the triple $(3,5,7) \implies y = 5$.