TOPICS
Search

Sexy Primes


Sexy primes are primes that differ by 6, so-named since "sex" is the Latin word for "six." The first few sexy prime pairs are (5, 11), (7, 13), (11, 17), (13, 19), (17, 23), (23, 29), (31, 37), (37, 43), (41, 47), (47, 53), ... (OEIS A023201 and A046117). In November 2005, the largest known sexy prime pair started with

 p={48011837012[(53238·7879#)^2-1]+2310}·(53238·7879#)/(385)+1,
(1)

where 7879# is a primorial. These primes have 10154 decimal digits and were found by M. Fleuren, T. Alm, and J. K. Andersen (Andersen 2005).

A sexy prime pair found by Batalov (2024ab) on Nov. 23, 2024 consists of p and p+6, where

 p=(16472224158(2^(166678)-1)-1)2^(83341)-5.
(2)

Both primes have 75274 decimal digits.

Sexy constellations also exist. The first few sexy triplets (i.e., numbers such that each of (p,p+6,p+12) is prime but p+18 is not prime) are (7, 13, 19), (17, 23, 29), (31, 37, 43), (47, 53, 59), ... (OEIS A046118, A046119, and A046120). As of Oct. 2026, the largest known sexy triplet starts with

 p=17484430616589·2^(54201)-7.
(3)

These primes have 16,330 decimal digits and were found by S. Batalov in June 2024 (Prime k-Tuplets).

The first few sexy quadruplets are (5, 11, 17, 23), (11, 17, 23, 29), (41, 47, 53, 59), (61, 67, 73, 79), (251, 257, 263, 269), ... (OEIS A023271, A046122, A046123, and A046124). Except for (5, 11, 17, 23), sexy quadruplets can only begin with a prime ending in a "1." As of Oct. 2026, the largest known sexy quadruplet starts with

 p=(35734184537·11677#)/3-9.
(4)

These primes have 5002 decimal digits and were found by S. Batalov in June 2024 (Prime k-Tuplets).

There is only a single sexy quintuplet, (5, 11, 17, 23, 29). Among any five numbers p, p+6, ..., p+24, one is divisible by 5. If all five are prime, that number must equal 5, which forces p=5.


See also

Cousin Primes, Prime Constellation, Prime Quadruplet, Twin Primes

Explore with Wolfram|Alpha

References

Update a linkAndersen, J. K. "Gigantic Sexy and Cousin Primes." Post to primeform user forum. Nov. 3, 2005. http://groups.yahoo.com/group/primeform/message/6637Batalov, S. "(16472224158(2^(166678)-1)-1)2^(83341)+1." PrimePages. Nov. 23, 2024a. https://t5k.org/primes/page.php?id=138731.Batalov, S. "(16472224158(2^(166678)-1)-1)2^(83341)-5." PrimePages. Nov. 23, 2024b. https://t5k.org/primes/page.php?id=138732.Update a linkDavis, K. "5132 Digit BLS Provable CPAP3 (diff=6)." Post to primeform user forum. Oct. 19, 2005. http://groups.yahoo.com/group/primeform/message/6542Numberphile. "Sexy Primes." Featuring J. Grime. May 8, 2012. https://www.youtube.com/watch?v=WJ12DYBuazY.Sloane, N. J. A. Sequences A023201, A023271, A046117, A046118, A046119, A046120, A046122, A046123, and A046124 in "The On-Line Encyclopedia of Integer Sequences."Prime k-Tuplets. "Sexy Prime Triples & Sexy Prime Quadruples." Accessed Oct. 29, 2026. https://www.pzktupel.de/CPAP/sexyP.php.Trotter, T. "Sexy Primes." https://www.trottermath.net/numthry/sexyprim.html.

Referenced on Wolfram|Alpha

Sexy Primes

Cite this as:

Weisstein, Eric W. "Sexy Primes." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/SexyPrimes.html

Subject classifications