This number theory problem is from my textbook and we can’t use Dirichlet theorem .[If $k>0,l>0,gcd(k,l)=1$,then there are infinite primes in the sequence $\left \{ kn+l\right \} $]
problem:If $a,b\in \mathbb{Z} ,b\ne 0,gcd(a,b)=1$,show that for a $m \in \mathbb{Z^{*}}$,there are infinite solutions for the equation about $k$, $gcd(a+bk,m)=1,k \in \mathbb{Z}$
standard answer (there is only the proof for existence, and in the follow ,the proof of infinite is easy):
We suppose $c$ is the largest number which satisfies $gcd(c,a)=1$ and $c |m$.
If $gcd(a+bc,m)=d$,we will prove $gcd(a+bc,m)=1$.
As $gcd(a,b)=1,gcd(a,c)=1$,we get $gcd(a,bc)=1$. So we have $gcd(d,a)=1,gcd(d,bc)=1$
If not,then $gcd(d,a)>1$ or $gcd(d,bc)>1$
Then,$gcd(d,a)$ or $gcd(d,bc)$ have prime divisor,i.e.,exist prime $p$,
s.t. $p|gcd(d,a)$ or $p|gcd(d,bc)$
As $d|a+bc$,
If $p|gcd(d,a)$,then $p|a,p|d$,so $p|a$ and $p|bc$,it contradicts with $gcd(a,bc)=1$.
If $p|gcd(d,bc)$, similarly,it contradicts with $gcd(a,bc)=1$.
So $gcd(d,bc)=1,gcd(d,c)=1$.
In the other hand,as $d|m,c|m,gcd(d,c)=1$,
we have $dc|m$.
Also because $gcd(d,a)=gcd(a,c)=1$,
we have $gcd(a,cd)=1$.
As $c$ is the largest number which satisfies $gcd(c,a)=1$ and $c |m$,the number $d$ must be $0$(If not,$dc>c$).
In conclusion, we have completed the proof of existence.
confusion
How to find the number $c$ which is defined in beginning of this answer ?
\gcd(a,b)for $\gcd(a,b)$ anda\mid bfor $a\mid b.$ – Thomas Andrews Jun 03 '25 at 20:44