Sexy Prime Calculator

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

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

  1. Check primality: Verify that both numbers are prime.
  2. Calculate the difference: Subtract the smaller number from the larger one and check if the difference equals 6.
  3. 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.

First 100 Sexy Prime Pairs

  • (5, 11)
  • (7, 13)
  • (11, 17)
  • (13, 19)
  • (17, 23)
  • (23, 29)
  • (31, 37)
  • (37, 43)
  • (41, 47)
  • (47, 53)
  • (53, 59)
  • (61, 67)
  • (67, 73)
  • (73, 79)
  • (83, 89)
  • (97, 103)
  • (101, 107)
  • (103, 109)
  • (107, 113)
  • (131, 137)
  • (151, 157)
  • (157, 163)
  • (167, 173)
  • (173, 179)
  • (191, 197)
  • (193, 199)
  • (223, 229)
  • (227, 233)
  • (233, 239)
  • (251, 257)
  • (257, 263)
  • (263, 269)
  • (271, 277)
  • (277, 283)
  • (307, 313)
  • (311, 317)
  • (331, 337)
  • (347, 353)
  • (353, 359)
  • (367, 373)
  • (373, 379)
  • (383, 389)
  • (433, 439)
  • (443, 449)
  • (457, 463)
  • (461, 467)
  • (503, 509)
  • (541, 547)
  • (557, 563)
  • (563, 569)
  • (571, 577)
  • (587, 593)
  • (593, 599)
  • (601, 607)
  • (607, 613)
  • (613, 619)
  • (641, 647)
  • (647, 653)
  • (653, 659)
  • (677, 683)
  • (727, 733)
  • (733, 739)
  • (751, 757)
  • (821, 827)
  • (823, 829)
  • (853, 859)
  • (857, 863)
  • (877, 883)
  • (881, 887)
  • (941, 947)
  • (947, 953)
  • (971, 977)
  • (977, 983)
  • (991, 997)
  • (1013, 1019)
  • (1033, 1039)
  • (1063, 1069)
  • (1087, 1093)
  • (1091, 1097)
  • (1097, 1103)
  • (1103, 1109)
  • (1117, 1123)
  • (1123, 1129)
  • (1181, 1187)
  • (1187, 1193)
  • (1217, 1223)
  • (1223, 1229)
  • (1231, 1237)
  • (1277, 1283)
  • (1283, 1289)
  • (1291, 1297)
  • (1297, 1303)
  • (1301, 1307)
  • (1321, 1327)
  • (1361, 1367)
  • (1367, 1373)
  • (1423, 1429)
  • (1427, 1433)
  • (1433, 1439)
  • (1447, 1453)