# Twin primes

In mathematics, a twin primes is a set of two prime numbers of the form {p, p + 2}. Usually the pair (2, 3) is not considered to be a pair of twin primes. Since 2 is the only even prime, this pair is the only pair of prime numbers that differ by one; thus twin primes are as closely spaced as possible for any other two primes.

Every twin prime pair except (3, 5) is of the form (6n − 1, 6n + 1) for some natural number n; that is, the number between the two primes is a multiple of 6.

First 20: {3, 5}, {5, 7}, {11, 13}, {17, 19}, {29, 31}, {41, 43}, {59, 61}, {71, 73}, {101, 103}, {107, 109}, {137, 139}, {149, 151}, {179, 181}, {191, 193}, {197, 199}, {227, 229}, {239, 241}, {269, 271}, {281, 283}, {311, 313}

Checkout list of first: 10, 50, 100, 500, 1000 twin primes. You can also check all twin primes.

## Visualization#

Every frame counter is increased by one. If it is twin prime then dot appears. Color has no meaning. Video has 25fps.

You can also compare it with other types.

## External#

- OEIS: A077800
- Wikipedia: Twin primes
- Youtube: Visualization up to 1 million

## Tags#

## Related Articles#

- Sexy prime triplets
- Prime Sextuplets
- Sexy prime quadruplets
- Sexy primes
- Cousin primes
- Prime Triplets
- Prime Quintuplets 2
- Prime Quintuplets 1
- Prime Quadruplets
- Chen Primes
- Sophie Germain Primes
- Safe Primes
- Restricted Right-truncatable primes
- Proth Primes
- Pythagorean Primes
- Quartan Primes
- Prime numbers
- Restricted Left-truncatable primes
- Pierpont Primes
- Additive and Multiplicative Primes
- Right-truncatable primes
- Palindromic Primes
- Solinas Primes
- Super Primes
- Thabit primes of the 2nd kind
- Thabit Primes
- Two sided primes
- Ulam Primes
- Wagstaff Primes
- Weakly Primes
- Wedderburn-Etherington Primes
- Wilson Primes
- Pierpont Primes Of the 2nd kind
- Mills Primes
- Multiplicative Primes
- Euclid Primes
- Bell Primes
- Carol Primes
- Centered Decagonal Primes
- Centered Heptagonal Primes
- Centered Square Primes
- Centered Triangular Primes
- Class 1+ Primes
- Cuban Primes 1
- Cuban Primes 2
- Cullen Primes
- Dihedral Primes
- Double Mersenne Primes
- Emirps
- Factorial Primes
- Additive Primes
- Fermat Primes
- Fibonacci Primes
- Genocchi Primes
- Good Primes
- Happy Primes
- Harmonic Primes
- Isolated Primes
- Kynea Primes
- Left-truncatable primes
- Leyland Primes
- Long Primes
- Lucas Primes
- Lucky Primes
- Mersenne Primes
- Woodall Primes