If $a_1x_1 + \ldots + a_nx_n = b$ has a solution modulo every $m$ then it has a solution in the integers.

40 Views Asked by At

I am trying to solve the following: If $a_1x_1 + \ldots + a_nx_n = b$ has a solution modulo every $m$ then it has a solution in the integers. Suppose there was not a solution in the integers. If the $a_i$ are coprime then there is obviously a solution by Bezout's. So suppose their gcd is $k \neq 1.$ If $k \mid b$ then we have a solution. So suppose $k$ does not divide $b.$ Then this means that in modulo $k$ we have $0 \equiv b \pmod{k}.$ Hence, there is no solution in mod $k.$ Does my proof work?