# Relation between some prime numbers and their sum

Let $p$ and $q$ be two prime numbers less than $900$ billion. If $p + 6, p + 10, q + 4, q + 10$ and $p + q + 1$ are all primes, what is the greatest value that $p + q$ can take?

Can you help me to solve this problem (useful relations exist but I don't know about them)?

• Take it as a generalization of "$p,p+3$ are both primes" (which implies $p=2$) Oct 3 '17 at 8:12
• @reuns How did you get $+3$ in there? Oct 3 '17 at 8:13

$p+10$ is prime, so not a multiple of $3$, so $p$ can't be $1$ less than a multiple of $3$. Similarly $q$ can't be $1$ less than a multiple of $3$. $p$ and $q$ can't both be $1$ more than a multiple of $3$, since then $p+q+1$ would be a multiple of $3$. So one of them is a multiple of $3$, and since prime must be equal to $3$.
In fact $q$ must be $3$ since $p+6$ is prime. Now the conditions reduce to $p+4$ ($=p+q+1$), $p+6$ and $p+10$ must all be prime. There are lots of possible choices for $p$; you just need to find the largest such $p$ in the range given.
• Note that since $p+4, p+6$ is a pair of twin primes, you can probably find a list to check them. Oct 3 '17 at 8:14