[Math] HCF/LCM problem

elementary-number-theory

Find the greatest number that will divide $x$, $y$ and $z$ leaving the same remainder in each case.

Now the solution for this is obtained by finding the HCF of $(x – y)$, $(y – z)$ and $(z – x)$.

Can you tell me why is that?

Best Answer

HINT: $x,y$ have the same reminder when divided by $d$ if and only if $d$ divides $x-y$.

Once you prove this, the claim follows immediately observing that $x,y,z$ have the same reminder when divided by $d$ if and only if all three pair, $x,y$; $x,z$ and $y,z$ have the same remainder when divided by $d$; if and only if $d$ divides $x-y, x-z, y-z$.