I have the following exercise.
If $ abc \equiv b \pmod{m} $ and $ \gcd{(a,m)} = 1 $, then $ ac \equiv 1 \pmod{m} $.
My attempt.
From $ abc \equiv b \pmod{m} $, by definition, $ abc - b = b ( ac - 1 ) = mh $.
Now: if $ b \mid h $, then $ ac - 1 = mk \implies ac \equiv 1 \pmod {m} $; if $ b \mid m $... I don't know what to do...
Ideas? Other solutions? Thanks.
This is incorrect. Take $(a,b,c,m) = (1,2,3,4)$ as a counterexample: We have $\gcd(a,m) = \gcd(1,4) = 1$ and $$abc \equiv 3! \equiv 6 \equiv 2 \equiv b \pmod4,$$ but $$ac \equiv 3 \cdot 1 \equiv 3 \not\equiv 1 \pmod 4.$$