2
$\begingroup$

Find all positive integers x and y such that x, y, x + y and x − y all are primes.

Ohkay now i have already solved the problem but i am looking for other methods to solve it.

Here is my work out

Since x − y is a prime, x − y > 0 =⇒ x > y. Suppose both x, y ≥ 3, then x + y becomes even and hence not a prime. So one of them must be 2. Hence y = 2 and x ≥ 3. So we have x − 2, x, x + 2 as primes. Consider three cases: Case 1: x = 3k + 1 where k ≥ 1, then x + 2 = 3k + 3 = 3(k + 1) which is certainly not a prime. Case 2: x = 3k + 2 where k ≥ 1, then x − 2 = 3k which is prime only if k = 1. This forces x = 5. A simple checking shows that this is indeed a solution. Case 3: x = 3k where k ≥ 1, then k = 1, which forces x − y = 1, not a prime. Thus x = 5, y = 2 is the only solution.

  • 1
    @dp1611: There's really no better solution. Any other solution would almost certainly have the same logical elements. Yours is well worded.2017-02-13
  • 0
    @dp1611 perhaps you could post your answer as an answer instead? (apart from asking for other solutions)?2017-02-13
  • 0
    gonna wait and see2017-02-13
  • 0
    Actually, the typesetting is not good. You should use dollar signs for mathematical symbols. Then the solution is clear. One concludes that $y=2$, since otherwise $x+y$ would not be prime, and then the fact that $x-2,x,x+2$ are all prime gives $x=5$.2017-02-13

1 Answers 1

1

Looks good. A (maybe) slightly faster way:

  1. $x>y$, just like you showed.
  2. Clearly, if $x,y$ are both prime, then $x+y$ must be an odd prime (since $x+y>2$), which means $x$ and $y$ cannot both be odd. Therefore, $y=2$.
  3. Since $y=2$, we have the demand that $x-2$, $x$, $x+2$ are all prime. However, in a list of three consequtive odd numbers, one of them must be divisible by $3$, which means one of them must be equal to $3$. Clearly, $x-2=3$, otherwise $x-2<2$ which is impossible.

Therefore, $y=2,x=5$.


But yeah, the idea in my version is exactly the same as in yours, so well done!

  • 0
    Maybe one could add "three consecutive odd numbers", because that's our situation.2017-02-13