<s>[INST] How to solve system of modular equivalence with parameter Given system of modular equivalences. Find the smallest natural parameter $a$ that system has solutions
$$\begin{cases}
x \equiv a \mod 140\\
x \equiv 3 \mod 91\\
x \equiv 2a \mod 39
\end{cases}$$
Of course, solution will be appreciated but if you don't want to solve this then please give me some hint, I don't even know how to approach this problem
 [/INST] If the system is consistent then it has solutions.
Since $140=4\cdot 5\cdot 7$ then the first system is equivalent to $$x \equiv a \pmod {4, 5, 7}$$
and similarly for the other congruences we have $x \equiv 3 \pmod{7, 13}$ and $x\equiv 2a \pmod{3,13}$.
From the first we have $x\equiv a \pmod{7}$ and from the second $x\equiv 3 \pmod{7}$. So for the system to be consistent we must have $a\equiv 3 \pmod{7}$.
Similarly from the second and third congruences we see that $a$ must also satisfy $2a\equiv 3\pmod {13}.$ Then since $2^{-1} \equiv 7 \pmod{7}$, we multiply the congruence by $7$ and obtain that $$14a\equiv a \equiv21\equiv8 \pmod{13}$$
Thus for the system to be consistent it has to satisfy $$a\equiv 3 \pmod{7}\space(1)$$ $$a \equiv8 \pmod{13}\space(2)$$
Since $7$ and $13$ are co-prime, there exists solutions modulo $7\times13=91$ by the CRT.
From $(2)$ we know that $a=8+13k_1$ for $k_1\in\mathbb Z$ and substituting into the first gives $$8+13k_1\equiv 3 \pmod{7}$$
$$13k_1\equiv 2 \pmod{7}$$
So $$13\times 6 k_1\equiv k_1\equiv 12\equiv 5 \pmod{7}$$
Thus $k_1=5+7k_2$ for $k_2\in\mathbb Z$ and hence we have $a=8+13k_1=8+13(5+7k_2)=73+91k_{2}.$
Hence $a\equiv 73 \pmod {91}$ and the smallest natural parameter of $a$ is $73$.
</s>