Loading...
October 21, 2024 at 1:01
English

Prime Triplets Problem: Find the Prime That Is Both a Sum and Difference of Two Primes

Solution to the Prime Triplets Problem

Several correct answers were submitted for the last challenge. Here is the complete solution.

There is exactly one such prime number: 5.

Why the Number 2 Must Be Involved

Let r be the prime we are looking for. Since r > 2, r is odd. All primes greater than two are odd, and since r must be both a sum and a difference of two primes, one of those two primes must be even — that is, equal to 2.

Setting Up the Equations

This gives us two equations: r = p + 2 and r = q − 2, where p and q are odd primes. Rearranging the second equation: q = r + 2.

So the three numbers p, r = p + 2, and q = r + 2 form a set of three consecutive odd numbers — a prime triplet.

Why Only 5 Works

Among any three consecutive odd numbers, one must be divisible by 3. The only prime divisible by 3 is 3 itself. Therefore the only valid prime triplet is 3, 5, 7, and the prime that satisfies both conditions is p = 5.

keyboard_arrow_up