primes and patterns/representations As we know that primes other than 2 and 3 can be expressible as:  $p \equiv 1\pmod{6}$ or $p \equiv -1\pmod{6}$. In other words, 6|(p-1) or 6|(p+1). Or, p = 6h+1 or 6h-1. 
Now, for any integer h, 6h-1 or 6h+1 may be decomposable. Say 6h -1 = $p_1$$p_2$ with $p_1$ = $p_2$ or $p_1$ < $p_2$. In the same way, 6h +1 = $p_3$$p_4$ with $p_3$ = $p_4$ or $p_3$ < $p_4$.
By observation, one can realize that, 5 is the only smallest factor. 
So, $p_2$= [(6h -1)/$p_1$] $\le $ [(6h -1)/5] Or $p_4$= [(6h +1)/$p_3$] $\le $ [(6h +1)/5].
If we consider m = h+6-($p_1$+$p_2$) and n =  h+6-($p_3$+$p_4$) the following are true. I am not sure how far I am true first of all. 
(1) $p_1$ = ½ (h-m+6) - square root of {$(n-m+6)^2$-4(6h-1)}
(2) $p_2$ = ½ (h-m+6) + square root of {$(n-m+6)^2$-4(6h-1)}
If (1) and (2) are correct, please explain with proof. If any one or both are wrong, please let me know, where, I am wrong. 
Thanking you one and all.
 A: Before going into (1) and (2):
From your definition, $h+6-(p_1+p_2)=m=h+6-(p_3+p_4)$.
Therefore $p_1+p_2=p_3+p_4$.
Also, $6h-1=p_1p_2$ and $6h+1=p_3p_4$.  
These conditions do not always hold for any $h$.
For example, take $h=24$.
$6h-1=143=11\times 13=p_1p_2$ and $11+13=p_1+p_2=24$.
On the other hand,
$6h+1=145=5\times 29=p_3p_4$ and $5+29=p_3+p_4=34$.  
$p_1+p_2=24\neq 34=p_3+p_4$  
Also, you defined $n=m$, so that $n-m=0$.
But this seems to defeat the purpose since the only time you used $n$ is in $n-m$.
i.e. (1): $p_1=\frac{1}{2}(h-m+6)-\sqrt{(n-m+6)^2-4(6h-1)}=\frac{1}{2}(h-m+6)-\sqrt{36-4p_1p_2}$  
But the part that causes everything to fail is in $\sqrt{36-4p_1p_2}=2\sqrt{9-p_1p_2}$.
For this to exist, you require $p_1p_2\leq 9$.
Hence $6h-1\leq 9$ and $h=1$.  
But then you may check that the first part does not hold.
$6h-1=5$ and $1+5=6$
$6h+1=7$ and $1+7=8$  
$6\neq 8$  
It might be possible that all these holds if you allow $h<0$.
But that means either $p_1<0$ or $p_2<0$, which I suppose do not fit your requirement that $p_1,p_2$ are primes.
A: You have $p_1p_2=6h-1$, $p_1+p_2=h-m+6$, $p_1\le p_2$. So, $$(x-p_1)(x-p_2)=x^2-(p_1+p_2)x+p_1p_2=x^2-(h-m+6)x+(6h-1)$$ Therefore, $p_1$ and $p_2$ are the smaller and larger roots of $$x^2-(h-m+6)x+(6h-1)=0$$ By the quadratic formula, $$p_1={h-m+6-\sqrt{(h-m+6)^2-4(6h-1)}\over2}$$ which is the formula (1) that you are asking about, except that I have $h$ under the square root where you have $n$. The formula for $p_2$ is the same but with the plus-sign in front of the square root. 
