number theory equation involving GCD

102 Views Asked by At

Fix the natural number $b$. How can I solve ? $$ x+\gcd(x,b) \equiv 0 \mod(b) $$ Can anyone please give me a reference? Best

1

There are 1 best solutions below

3
On BEST ANSWER

Let $x=cd$ where $d=\gcd(x,b)$, and let $a:=b/d$. Then we have $\gcd(a,c)=1$, and $$cd+d\equiv 0 \pmod{ad}$$ so that $c+1\equiv 0\pmod a$.

It means, that for each divisor $d$ of $b$, we can choose $c:\equiv -1\pmod{b/d}$, then $x:=cd$ will be a solution, as $c\equiv -1\pmod{a}$ already implies $\gcd(a,c)=1$ hence $\gcd(b,x)=d$.