Enter two numbers to check if they are sexy primes, or specify a range to generate all sexy prime pairs.
Sexy Prime Check or Generate
Result
Result
What Are Sexy Primes?
A sexy prime is a pair of prime numbers that differ by exactly 6. In other words, if p and q are both prime numbers and q = p + 6, the pair (p, q) is called a sexy prime pair.
How to Determine if Two Numbers Are Sexy Primes
Check primality: Verify that both numbers are prime.
Calculate the difference: Subtract the smaller number from the larger one and check if the difference equals 6.
Result: If both numbers are prime and their difference is 6, they form a sexy prime pair. Otherwise, they are not a sexy prime pair.
Examples
Example 1: Are 1301 and 1321 Sexy Primes?
Solution:
Prime check: 1301 is a prime number, and 1321 is also a prime number.
Difference calculation: 1321 - 1301 = 20.
Result: The difference is not 6, so (1301, 1321) is not a sexy prime pair.
Example 2: Are 1997 and 2003 Sexy Primes?
Solution:
Prime check: 1997 is a prime number, and 2003 is also a prime number.
Difference calculation: 2003 - 1997 = 6.
Result: Both numbers are prime, and their difference is 6, so (1997, 2003) is a sexy prime pair.