Show that among every consecutive 5 integers one is coprime to the others
I considered these 5 numbers as: $5k,5k+1,5k+2,5k+3,5k+4$
It's seen that for example $5k+1$ is coprime to $5k$ and $5k+2$,now it remains to show $5k+1$ is coprime to $5k+3,5k+4$
Let $\gcd(5k+1,5k+3)=d\Rightarrow\ d|2\Rightarrow\ d=1\ or\ 2$
If $d=2$ then $5k+1$ must be even , so does $5k+3$ , so $k$ must be odd.
I stopped here!!


3 Answers 3


Among any $6$ consecutive integers, there are two that are coprime to $6$. So among any $5$ consecutive integers, there is at least one that is coprime to $6$. This number if also coprime to the others, because the only possible common prime divisors are $2$ and $3$.

  • $\begingroup$ I prefer a nicer and direct technique,but appreciate yours $\endgroup$ Apr 16, 2016 at 15:28
  • $\begingroup$ @HamidRezaEbrahimi This answer might as direct as the accepted solution but it’s far more elegant $\endgroup$
    – user675768
    Jun 11, 2020 at 15:28

Let $n$ be a natural number. Consider five consecutive numbers $(n-2),(n-1),(n),(n+1),(n+2)$.

  • If $n$ is even then $n-1$ and $n+1$ only can be coprime to all others. since these two are consecutive odd numbers, thus they are coprime . now the largest odd number less than $ 5$ is $3$. if $n-1$ is a multiple of $3$ then so will $n+2$ be , in which case $n+1$ definately would be coprime to all others.

  • If $n$ is odd then ($n-2$, $n$),($n$, $n+2$) being pairs of consecutive odds will be coprime. if $n-2$ is a multiple of $3$ then so will $n+1$ be. but $n$ and $n+2$ wont be multiples of $3$, in which case both $n$ and $n+2$ will be coprime to all others. note: if the first odd number in each case (i.e. n being even or odd) is not a multiple of $3$ then the reasoning is simpler.

  • 1
    $\begingroup$ Put in other words: If n is even then n-1 (and n+1) is coprime to all others,if n is odd then n(and n-2) is coprime to all others,that's it.Thank you. $\endgroup$ Apr 20, 2016 at 14:53

Suppose the prime $p$ divides two of the integers $5k,\cdots,5k+4$. Then there are two integers $i,j \in \{0,\cdots,4\}$ such that $i \equiv j \pmod p$, so that $p = 2$ or $p=3$. The integer $6$ can obviously never divide two integers whose distance is less than $5$, so the gcd of two such integers is either $1,2$, $3$ or $4$.

Now it is not hard to check that at most $3$ integers out of those $5$ are divisible by $2$ and at most $2$ integers out of those $5$ are divisible by $3$. But it can't be that all five are divisible by either $2$ or $3$ since when three are divisible by $2$ and two are divisible by $3$, one of the five is divisible by $6$ (check this!).

Another way of saying this is that the units of $\mathbb Z/6\mathbb Z$ are $\overline 1$ and $\overline 5$. Any set of five consecutive integers, when reduced modulo $6$, contains at least one of these two.

Hope that helps,


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .