Sexy Primes

DOWNLOAD Mathematica Notebook

Sexy primes are pairs of primes of the form (p, p+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). As of November 2005, the largest known sexy prime pair starts with

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

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

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 October 2005, the largest known sexy triplet starts with

 p=(61310346529·205881·4001#·(205881·4001#+1)+210)·(205881·4001#-1)/(35)+1.
(2)

These primes have 5132 digit digits and were found by Davis (2005).

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

 p=411784973·2347#+3301.
(3)

These primes have 1002 digits and were found by J. K. Andersen (2005).

There is only a single sexy quintuplet, (5, 11, 17, 23, 29), since every fifth number of the form 6n+/-1 is divisible by 5, and therefore cannot be prime.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.