[Math] Find a number leaving a particular remainder with 3 different numbers

contest-mathelementary-number-theorypuzzle

I have the following question:

Let $N$ be the greatest number that will divide $1305, 4665$ and
$6905$, leaving the same remainder in each case. What is the sum of
digits of $N$.

My approach was to first of all find the LCM of these $3$ numbers which is say $x$ and add $9$ to it.

This approach is absolutely incorrect.

Best Answer

If the three numbers are $a,b,c$, I believe the answer you are looking for would be $\text{gcd}(a-b, b-c)$.

Say numbers are $a_1, a_2, a_3$. Then we have that for some $x$

$$a_i = q_i N + x$$

This implies that $N$ dividies $a_2 - a_1$ and $a_3 - a_2$, and any $k$ which divides both the differences will necessarily leave the same remainder with the three numbers.

Thus you take the greatest common divisor for the two differences.