Prove that among any five consecutive positive integers there is one integer which is relatively prime to the other four integers.

1k Views Asked by At

Two integers are called relatively prime if the greatest common divisor of $m$ and $n$ is $1$. Prove that among any five consecutive positive integers there is one integer which is relatively prime to the other four integers. (Hint: For any two positive integers $m < n$, any common divisor has to be less than or equal to $n - m$).

The question has already been asked before here, but I do not understand the steps. Is there a simpler approach? Or can anyone explain any of the answers provided in the linked question in details?

The problem is I'm not comfortable with Pigeon-hole principle or GCD (and divisibility) or modular arithmetic. Assume I do not know any of these.

3

There are 3 best solutions below

1
On

Call the middle number $n$.

Now, if $n$ is odd, then $n$ is co-prime with $n-1$ and $n+1$ since the difference is only $1$. But $n$ is coprime with $n-2$ and $n+2$ as well, since all of them being odd means they don't have a common prime factor of $2$, and since the difference between $n$ and the other two is only $2$, there cannot be any other common prime factor.

If $n$ is even, then $n-1$ or $n+1$ are both odd, and at least one of them is not divisible by $3$, since with a difference of $2$, they can't both be divisible by $3$. So the one that is not divisible by $3$ has no prime factors smaller or equal to $3$, and since the difference with all the others is at most $3$, that one shares no common prime factors with any of the others, and is therefore coprime with all the others. So: if $n$ is even then either $n-1$ or $n+1$ (or both) are coprime with all the others.

0
On

If two number differ by $1$, they are relatively prime. If they differ by $2$, their greatest common divisor is either $1$ or $2$. And if they differ by $3$, their greatest common divisor is either $1$ or $3$. Therefore, given five consecutive numbers:

If the middle number is odd, then it is relatively prime to the two adjacent numbers on each side of it.

If the middle number is even, then at least one of the two odd numbers adjacent to it is not divisible by $3$. That odd number (or either of them, if neither is divisible by $3$) is relatively prime to the other four numbers.

0
On

Let the numbers be $$n-2, n-1, n, n+1, n+2$$

Case I: $n$ is odd , then $n$ is prime to all the $4$ other integers, as is easy to see.

Case II, $n-1$ and $n+1$ are odd. $n-1$ is prime to all except maybe $n+2$, both of which may be divisible by $3$. Similarly $n+1$ is prime to the others except maybe $n-2$, both of which may be divisible by $3$. However not all of these numbers can be divisible by $3$ so one of $n-1$ or $n+1$ will satisfy the requirements.