# A condition for being a prime: $\;\forall m,n\in\mathbb Z^+\!:\,p=m+n\implies \gcd(m,n)=1$

If $\;p=m+n$ where $p\in\mathbb P$, then $m,n$ are coprime, of course. But what about the converse?

Conjecture:

$p$ is prime if $\;\forall m,n\in\mathbb Z^+\!:\,p=m+n\implies \gcd(m,n)=1$

Tested (and verified) for all $p<100000$.

• This is very easy to prove – user261263 Jul 10 '16 at 10:29
• @EugenCovaci, yes I saw that. But I've never thought about this relationship before and I'm hunting for the 'Socratic' badge. $\;\overset{..}{\smile}$ – Lehs Jul 10 '16 at 10:38
• There is no need to specify $p \ge 2$ – user261263 Jul 10 '16 at 19:16
• You should work out a few examples by hand instead of 100,000 by computers. – djechlin Jul 11 '16 at 2:40
• @djechlin. Thanks for the tip, which is a good one. I'm working with my BigZ and the questions arise when examine this computer system. forthmath.blogspot.se – Lehs Jul 11 '16 at 4:19

It is true. Suppose $p\geqslant 2$ is not prime. Then we can write $p=xy$ with $x,y\geqslant 2$. Then we find $p=m+n$, with $m=x$ and $n=x(y-1)$. Those are obviously not coprime.
If $d \mid p$ and $d<p$, then $1 = \gcd(d, p-d) = \gcd(d, p) = d$, so $p$ is prime.
• It's a bit terse and could be improved by a little more elaboration. I think you are saying $p=1$ is not prime, but the condition on $m,n\in \mathbb{Z}^+$ holds vacuously. – hardmath Jul 10 '16 at 20:55