System of congruences with not coprime numbers

232 Views Asked by At

I have a system of congruences, for example
$ x \equiv 2 \mod 15$
$ x \equiv a \mod 21$
where $a$ is an integer to be determined.
I have to find all the values of $a$ for which the system has solutions.
My question is: since $gcd(15,21)=3 \neq 1$, how can I determine if the system has solutions? And if it has, how can I find them?

1

There are 1 best solutions below

0
On BEST ANSWER

$$x\equiv2\pmod{15}\implies x\equiv2\pmod3,\equiv2\pmod5$$

$$x\equiv a\pmod{21}\implies x\equiv a\pmod3,\equiv a\pmod7$$

So, we need $a\equiv2\pmod3$

Alternatively,

we have $15A+2=a+21B\iff3(5A-7B)=a-2\iff5A-7B=\dfrac{a-2}3$

$\implies 3$ must divide $a-2\iff a=2+3C\implies5A-7B=C$ which is always solvable as $(5,7)=1$