I've been having serious trouble with this problem,
The first direction->
Proving x is prime if for every integer y, either gcd(x,y)=1 or x|y doesn't seem too difficult.
We know that if gcd(x,y)=1 then they are coprime.. but what does the fact that x|y tell us that would allow us to conclude that x is prime?
And the other direction..
Prove either gcd(x,y)=1 or x|y if x is prime. Seems easier, I haven't gotten around to finishing it, but I assume I would use the definition of a prime number to prove it?
I.e. x is only divisible by 1 or x... Am I on the right track for this proof?..