# Proving $6n-1$, $6n+1$, $6n+2$, $6n+3$, $6n+5$ to be relatively prime

Let $n$ be an integer. Prove that the integers $6n-1$, $6n+1$, $6n+2$, $6n+3$, and $6n+5$ are pairwise relatively prime.

I tried to prove that the first two integers in the list are relatively prime.

$$(6n-1-(6n+1)=1$$ $$6n-1-6n-1=1$$ $$-2=1,$$ which is obviously not true.

Not sure where to go from here. Is there another way to prove that two integers are relatively prime?

• HINT: $1\leq\gcd(a,b)\leq|a-b|$. – barak manos Sep 4 '16 at 7:54
• You can't assume $(6n-1)-(6n+1)=1$ even if you know they're relatively prime. All that $(6n-1)-(6n+1) = 2$ tells you is they're both odd, hence relatively prime wrt 2; but you already knew that from their construction. – smci Mar 22 '17 at 14:04
• Hint: 5 numbers, residues modulo 6. Pigeonhole Principle – smci Mar 22 '17 at 14:05

Hint: Suppose a prime $p$ divides two of these numbers. Then $p$ also divides their difference, which is one of the numbers $1$, $2$, $3$, $4$, $6$. It follows that $p=2$ or $p=3$. Can you finish from there?
Say a prime $p$ divides any two of them. So $p$ divides their differences.But the possible differences is $1,2,3,4,6$. As $p$ divides one in this set,$p$ must be 2 or 3. But no 'two numbers' in the original set are even. Hence 2 is not possible.
And Only $6n+3$ is divisible by 3. Hence 3 can't divide two of them.