# Are there infinitely many primes $p$ such that $p-2$ and $p+2$ are composite?

Are there infinitely many primes $$p$$ such that $$p-2$$ and $$p+2$$ are composite?

If $$p\neq3$$ then either $$p+2$$ or $$p-2$$ is a multiple of three, but this does not settle the matter for both.

We know that there are infinitely many primes. But it is not known whether there are infinitely many twin primes, so something extra is needed here.

Any prime that is $8$ modulo $15$ works, and by Dirichlet's theorem on arithmetic progressions, there are infinitely many such primes.
• @user254665 : Well, Brun's theorem states that the sum of the reciprocals of the twin primes converges. That the zeta function has a pole at $1$ says the sum of the reciprocals of the primes diverges to infinity. Therefore, there are infinitely many such $p$. Now how elementary is Brun's theorem? – Eric Towers Oct 6 '16 at 2:26
• @user254665 Not in the same spirit as Starfall's answer. Elementary methods for Dirichlet work only for $p\equiv a\pmod b$ with $a^2\equiv1\pmod b$. With Starfall's idea we'd take $a\equiv\pm\,2$ modulo some primes dividing $b$, so for elementary methods to apply we need $2^2\equiv1\pmod p$, leaving only $p=3$. – Bart Michels Feb 11 '17 at 23:43
• @punctureddusk That result refers only to proofs via Euclid's argument for the infinitude of the primes. This proof by Erdos, is elementary and applies to $15n+8$, among other cases. – logarithm May 5 '19 at 14:15