# Primes $p$ for which $2p \pm 1$ are also primes

Out of curiosity and trouble sleeping, I decided to look at the distribution of primes $p$ for which $2p \pm 1$ are also primes. I looked at the first 25,910,000 primes and counted the number of primes $p$ for which either, neither, both, or only one of the two numbers $2p \pm 1$ is also a prime. Here's the last entry in my table:

n: 25,910,000

p: 491,073,763

(the 25,910,000-th prime is $p =$ 491,073,763)

2p-1: false

2p+1: false

($p$ is such that neither $2p-1$ nor $2p+1$ is a prime)

# only 2p-1: 1,746,284

(there are 1,746,284 primes $p$ less than or equal to 491,073,763 such that $2p-1$ is also a prime but $2p+1$ is not a prime)

# only 2p+1: 1,747,286

(there are 1,747,286 primes $p$ less than or equal to 491,073,763 such that $2p+1$ is also a prime but $2p-1$ is not a prime)

# neither: 22,416,428

(there are 22,416,428 primes $p$ less than or equal to 491,073,763 such that neither $2p-1$ nor $2p+1$ is a prime)

# either: 3,493,572

(there are 3,493,572 primes $p$ less than or equal to 491,073,763 such that at least one of $2p-1$ and $2p+1$ is a prime)

# both: 2

(there are 2 primes $p$ less than or equal to 491,073,763 such that both $2p-1$ and $2p+1$ are primes)

The table I generated actually has rows only for every 10,000 primes (and isn't as verbose as the above) but the counting is, of course, done for every prime $p$ such that $2p+1$ is less than or equal to the last prime in the list I have, of the first 50 million primes.

I have three questions:

1. Is it known whether 2 and 3 are the only primes $p$ such that both $2p \pm 1$ are primes? If so, is there an elementary reason why they are (or are not) the only such primes? Answered in a comment below

2. Are there any results regarding the fluctuation in the numbers of only-$(2p-1)$ and only-$(2p+1)$? I noticed that for sometimes quite large ranges one number dominates the other, only to be dominated later on for another, often also large, range.

3. Are there results concerning the distribution of primes that differ by $2m$, for a given value of $m$? It didn't occur to me to tabulate those until just now so I don't have any data to look at at the moment.

I know that this question is related to Sophie Germain primes and there's even a related question here already but my questions above are somewhat more specific.

Disclaimer: Although I'm reasonably well versed in many areas of math (I was a theoretical physicist once, in a life now in the past), Number Theory is not one of those areas, unfortunately, so please provide answers at the appropriate level.

• If both $2p-1$ and $2p+1$ are primes, then they are twin primes. If they are both $>3$ this means that they are of the form $6k\pm1$ for some integer $k$. I think you can show why this case never occurs. – Jyrki Lahtonen Sep 4 '15 at 5:02
• See also: two-prime-factor values in the series $\binom n2$ – abiessu Sep 4 '15 at 5:02
• The both is easy. If $p$ is not divisible by $3$, then one of $2p-1$ or $2p+1$ is divisible by $3$. So the only possibilities are when one of the numbers $p$, $2p-1$, or $2p+1$ is $3$. And it can't be $2p+1$. – André Nicolas Sep 4 '15 at 5:03
• A major recent result is that there exists an even integer $2m$ such that there are infinitely many pairs of primes that differ by $2m$. Look for information under Zhang, twin primes. My memory is poor, but I think it is now known that $m\le 123$. – André Nicolas Sep 4 '15 at 5:17
• Since it's not known that there are infinitely many primes $p$ such that one or the other of $2p\pm1$ is prime, I don't see how anything can be known about the fluctuations of the two counts. For all we know, one or the other or both counts stabilize after some point. – Gerry Myerson Sep 4 '15 at 7:18