<s>[INST] Smallest integer which leaves remainder 3, 2, 1 when divided by 17, 15, 13 Find the smallest positive integer so that the remainder when it is divided by $17,15,13$ is $3,2,1$ respectively.
This question can be solved using Chinese remainder theorem, but the theorem gives any integer, not the smallest. 
For example, we have, letting $n_1, n_2, n_3 = 17, 15, 13$ and $a_1, a_2, a_3 = 3, 2, 1$ and $N_j = \frac{1}{n_j}\cdot\prod n_i$:
$$x = \sum a_i N_i^{\phi(n_i)}
\\x = 3\cdot(15\cdot 13)^{16} + 2\cdot(17\cdot13)^{8} + (17\cdot 15)^{12}$$
Essentially here $ N_1^{15} = (15\cdot 13)^{15}$ is root of $N_1 x \equiv 1(\mathrm{mod} \ 17)$
By choosing different roots, we get different answers, but how can we find the minimum $x$ that satisfies the condition?
Just so in this case the minimum is $1652$
 [/INST] If $x\equiv3\mod 17$ and $x\equiv2\mod 15,$ then $17a+3\equiv 15b+2\mod 17\times15,$
so $17a+3\equiv2\mod 15,$ so $17a\equiv -1 \mod 15,$ so $2a\equiv -1\mod 15,$ so $a\equiv7 \mod 15,$ 
so $x=17(15c+7)+3=255c+122$.  
If also $x\equiv1\mod 13$ then $255c+122\equiv13e+1$ so $255c+122\equiv1 \mod 13,$ 
so $255c\equiv-121\mod 13,$ so $8c\equiv9 \mod 13,$ so $c\equiv45\equiv6\mod 13,$ so $c=13d+6,$ 
so $x=255c+122=255(13d+6)+122=3315d+1652.$
</s>