<s>[INST] Can I apply Chinese remainder theorem here? 
A number when divided by a divisor leaves $27$ remainder. Twice the number when divided by the same divisor leaves a remainder $3$. Find the divisor.

My attempt:
Let, the number be=$n$ and the divisor be=$d$.
Thus, we have $n\equiv 27\pmod d$ and $2n\equiv 3\pmod d$.
Thus we have two congruence equations. Can we, by any chance, apply the Chinese Remainder theorem to find $d$?
 [/INST] Let the number be $n$, and the divisor be $d$.
$\frac{n}{d} = X + \frac{27}{d}$ and also $\frac{2n}{d} = Y + \frac{3}{d}$
Where $X$ and $Y$ are different or same positive integers, comparing the two
$$2X + \frac{54}{d} = Y + \frac{3}{d}$$
$$2X = Y + \frac{3}{d} - \frac{54}{d}$$
$$2X = Y - \frac{51}{d}$$
Now the value of $d$, must be a factor of $51$, the factors are $1, 3, 17$ or $51$.
It could also be the negative of any of those values.
If the question had stated that $n$ and $d$ are in their lowest term
$Y$ is an odd number, because $d$ is also odd
$n > 27$ and $n > X*d$
because $\frac{n}{d} = X + \frac{27}{d}$, if $n$ and $d$ were in their lowest term then $n > d$, this is a proper fraction, then $\frac{27}{d}$ must be the improper part, so that $d > 27$
Therefore d would be $51$
If $X$ is odd, $n$ would be even and vice versa.
</s>