7

I came around this question:

Show that if $a$, $b$, and $c$ are integers such that $(a, b) = 1$, then there is an integer $n$ such that $(an + b, c) = 1$,

in the Chinese Remainder Theorem section of my textbook and wasn't too sure how I could break that up so I could use the CRT to solve it.

Any hints would be greatly appreciated thanks!

Ian Mateus
  • 7,431
DJ_
  • 1,400

3 Answers3

7

Let $p_1,p_2,\ldots,p_i$ be the common prime divisors of $c$ and $b$, with their respective powers $e_1,\ldots,e_i$ in the prime factorisation of $c$.

If we set $d=p_1^{e_1}\cdots p_i^{e_i}$, then $n=\frac cd$ will satisfy $\gcd(an+b,c)=1$.

To see why, suppose $q$ is prime and $q$ divides both $c$ and $an+b$. If $q\mid b$, then we should have $q\mid an$ which is impossible since $\gcd(a,b)=1$ and $\gcd(n,b)=1$. If $q\nmid b$, then $q\mid n$ and therefore $q\nmid an+b$, a contradiction again.


As a second solution I will give an inductive proof. Clearly the desired theorem is true for $a,c=\pm 1$.

Now suppose we know it's true for all $a,c$ satisfying $|a|+|c|\leq s$. (We will do induction on $s$.)

Let $|a|>1$. (The case $a=\pm1$ is trivial and needs no induction, in fact.)

If $a\mid c$, let $c=c'a$ and then $(na+b,c)=(na+b,c'a)=(na+b,c')$ for all $n$, because we are given $(a,b)=1$. Now $|a|+|c'|<|a|+|c|$ and we conclude, by the induction hypothesis, there is a $n$ satisfying $(na+b,c)=1$.

If $a\nmid c$, let $g=(a,c)$.

We are looking for an integer $d$ with $(d,c)=1$ such that $an+kc=d-b$ has a solution for $n$ and $k$. (This is simply rewriting $(an+b,c)=1$ where $d\equiv an+b\pmod c$.)

It is well know that such a linear equation has a solution if and only if $g\mid d-b$, or equivalently $d=n'g+b$ for some $n'$. Because $|g|<|a|$ we can again use the induction hypothesis, and conclude that there exists such a $n'$, and therefore there exists such $n$.

Remark: I do not use the Chinese remainder theorem in any of these solutions. I'll try to find one that does use it, but I don't have any thoughts leading that way, unfortunately. I hope this answer still adresses your question.

Bart Michels
  • 26,355
  • Would't just be easier to set $d=(b,c)$? – chubakueno Dec 17 '13 at 18:28
  • @chubakueno that won't work if $n$ has more prime divisors $p$ then $b$ has. We would have $p\mid an+b$ because $p\mid n$. (take for instance $a=1$, $n=25$ and $b=5$.) – Bart Michels Dec 17 '13 at 18:38
  • Oh, true! I read this wrong. – chubakueno Dec 17 '13 at 18:42
  • @barto how come gcd of (n,b) = 1, so d is not (b,c? but you're pulling out their common prime divisors though? – DJ_ Dec 17 '13 at 20:39
  • $(n,b)=1$ because that's the way I chose $n$: indeed, I took all common prime divisors away. – Bart Michels Dec 17 '13 at 21:27
  • @barto so d = p1..pi not their powers then? b/c if you took all the powers too don't have you the GCD? – DJ_ Dec 17 '13 at 22:22
  • @DJ_ the first thing I do is check what the common prime divisors of $b$ and $c$ are. I call them $p_1,\ldots,p_i$. Then I look to the prime factorisation of $c$. This factorisation will contain the primes $p_1,\ldots,p_i$, each with a certain exponent $e_1,\cdots,e_i$. – Bart Michels Dec 18 '13 at 10:19
  • Now $d$ is not (always) equal to $\gcd(b,c)$. Take for example $b=60=2^2\cdot3\cdot5$, and $c=126=2\cdot3^2\cdot7$. Then $p_1=1$, $p_2=3$, $e_1=1$, $e_2=2$ so $d=2^1\cdot3^2$. But, $\gcd(60,126)=2^1\cdot3^1$. – Bart Michels Dec 18 '13 at 10:28
3

Set

$$ n = \displaystyle \prod_{\substack{p \mid c \\ p \nmid a}} p, $$

with $n=1$ if there is no prime divisor of $c$ that does not also divide $a$.

We claim that $\gcd(a+bn,c)=1$.

Consider any prime divisor $p$ of $c$. If $p \mid a$, then $p \nmid b$ (since $\gcd(a,b)=1$) and $p \nmid n$ (by the definition of $n$). Hence $p \nmid bn$, and so also $p \nmid (a+bn)$.

If $p \nmid a$, then $p \mid n$ (by the definition of $n$). Hence $p \mid bn$, and again $p \nmid (a+bn)$.

Thus $\gcd(a+bn,c)=1$. $\blacksquare$

AT1089
  • 973
2

Assume that for any $n$, $\gcd(an+b,c)=p>1$.

From $an+b=kp$ and $ax+by=1$, we have $ax+(kp-an)y=1$.

Now we have $a(x-ny)+p(ky)=1$, which implies that $\gcd(a, p)=1$. This is contrary to $\gcd(a, p)=p>1$.

So our assumption must be false, and there is a $n$ such that $\gcd(an+b,c)=1$.

Integrand
  • 8,457
  • I do not see how we get $\gcd(a, p)=p$ for the contradiction, or how $\gcd(an+b,c)=p$ for all $n$ is used. If this worked it would 'prove' that $\gcd(an+b,c)=1$ for any $n$, or that $\gcd(an+b,c)$ is not the same $p$ for all $n$, but they could still all be different from $1$. – Conifold Jan 28 '24 at 03:58