Determining if two integer can be coprime I am trying to prove a proposition and in my proof I find this problem:
Let $$n_1 = a + \lambda b + rpb$$ and $$n_2 = c + \lambda d + rpd,$$ with $(a,b) = 1$, $(b,d) = 1$, $(p,a+\lambda b)=1$, $(p,c+\lambda d) = 1$, $(\lambda,p) = 1$ and $(a+\lambda b, c + \lambda d) >1$. The question is if there is a way to say that there exist $r$ integer nonnegative such that $(n_1,n_2) = 1$?
I don't know that there isn't many criteria to determine theoretically if two integers are coprime, but maybe there's an argument using the fact that all the numbers are fixed but $r$, and many of them are relatively prime.
 A: Assume that for all $r$, we have some prime dividing both $n_1$ and $n_2$. If there are only finitely many such primes, we can directly use Chinese Remainder Theorem to find some value of $r$ such that no prime of that finite set divides either expression. Thus, we must have infinitely many primes dividing both expressions simultaneously for some $r$. This shows that:
$$\frac{-a-\lambda b}{pb} \equiv \frac{-c-\lambda d}{pd} \pmod{q}$$
for infinitely many primes $q$. Then:
$$pd(a+\lambda b) \equiv pb(c+\lambda d) \pmod{q} \implies pd(a+\lambda b)=pb(c+ \lambda d)$$
as it isn't possible for two distinct values to be congruent modulo arbitrarily large primes (primes larger than them). This shows that $ad+\lambda bd=bc+\lambda bd \implies ad=bc$. Since $\gcd(a,b),(d,b)=1$, this shows $b=1$ and $c=ad$. If this is the case, then:
$$n_1=a+\lambda+rp$$
is a constant. We can find $r$ such that none of the primes dividing $n_1$ divide $n_2$ by Chinese Remainder Theorem. This concludes that $n_1$ and $n_2$ have to be relatively prime for some value of $r$ using proof by contradiction.
