# Find all numbers $p$ such that all six numbers $p$, $p+2$, $p+6$, $p+8$, $p+12$, $p+14$ are primes

Find all numbers $p$ such that all six numbers $p$, $p+2$, $p+6$, $p+8$, $p+12$, $p+14$ are primes

I know that $p=5$ works, but I don't know how to find all values for $p$, if any?

Consider these numbers modulo $5$ $$p,p+2,p+1,p+3,p+2,p+4$$ This is a complete set of residues. Hence, one of these number must be divisible by $5$.
This means that $p\leq 5$, otherwise all these numbers would be greater than $5$ and one of them will be a multiple of $5$. Hence, one of them is composite. (contradicting the fact that all of them are primes.)
• (+1) @flamingohats: Since $5$ must divide one of the numbers and all of them are prime, then one of the numbers must be $5$. It does matter, then, that there are two $p+2$ elements in the set of residues modulo $5$. In particular, it means that we cannot allow $5$ to divide $p+2$ (for then $p+2=5$, so $p+12=15$, which is not prime). Under the assumption that $p>0$, the only option left is $p=5$. – Cameron Buie Dec 27 '12 at 16:12