# Only 3 $n$ where $q=\left\lfloor (2 p_n+p_{n+2}) (p_{n}+p_{n+1}+p_{n+2})\over p_{n}\right\rfloor,\;\text{isPrime}(q)$?

Consider: $$q=\left\lfloor (2 p_n+p_{n+2}) (p_{n}+p_{n+1}+p_{n+2})\over p_{n}\right\rfloor,\;\text{isPrime}(q)$$

where $p_n$ denotes the $n$th prime.

Other than: $$n=6\quad\text{or}\quad n=8\quad\text{or}\quad n=9$$ $$p_6=17\quad\text{or}\quad p_8=23\quad\text{or}\quad p_9=29$$

Are there any $n$ such that $\text{isPrime(q)}=\text{true}$?

I have tested all $p_n < 10^7$, so if someone could explain why this is the case(if it is the case), or present an unconditional argument; It would be greatly appreciated.

Cheers!

Edit:

Observation:

Most $q,\;q>(p_9p_{10})$ is of form such that $q=3k$

• @JohnWo I can't seem to reproduce values beyond $n=8$, which gives the prime $227$. With $n=6$, I get $q=162$, and with $n=10$ I find $q=297$. May 17, 2013 at 3:49
• If we assume Cramer's conjecture, then $q$ is not prime for sufficiently large $n$. Unfortunately I don't have time right now to see if there is an unconditional argument. May 17, 2013 at 3:51
• @AWalker: There where errors in the question which now are corrected. May 17, 2013 at 3:53
• @JohnWO $a=p_n$? May 17, 2013 at 3:55
• @AWalker: Changed the form of $q$ so that it is correct. It reflected $p_n+p_{n+1}$ instead of the correct $p_n+p_{n+2}$ at one point. May 17, 2013 at 3:59

Let $p_{n+1}=p_n+G_n$ and $p_{n+2}=p_n+H_n$ then \begin{align} q &= \left\lfloor \frac{1}{p_n}(3p_n+H_n)(3p_n+G_n+H_n)\right\rfloor \\ & = 9p_n+3G_n+6H_n+\left\lfloor\frac{H_n(G_n+H_n)}{p_n}\right\rfloor \\ & = 3p_{n+1}+6p_{n+2}+\left\lfloor\frac{H_n(G_n+H_n)}{p_n}\right\rfloor \end{align}
If $H_n<\sqrt{p_n}$ then the last term is either zero or 1 and $q$ is divisible by 3 or 2 respectively. This seems to be the case for $p_n>1327$, and would follow as @IvanLoh said from Cramér's conjecture for $n$ large enough.
I'll hypothesize that to establish that no other $q$ is prime would require showing that there cannot be gaps large enough that $2p_n<H_n(G_n+H_n)$, since there are plenty of $n$ for which $3p_{n+1}+6p_{n+2}+2$ is prime. This condition, though weaker than Cramér's conjecture, is still tighter than the best currently available bounds on prime gaps.
• Does $H_n, G_n$ denote any integer $H_n \neq G_n$? May 21, 2013 at 3:14
• @JohnWO They are not arbitrary, $G_n=p_{n+1}-p_n$ is the prime gap after $p_n$, and $H_n=p_{n+2}-p_n=p_{n+2}-p_{n+1}+G_n$ is the sum of the two prime gaps after $p_n$. May 21, 2013 at 11:29