# Solve congruent equation with mod 125

I am stuck solving the following equation : 12x = 13 mod 125.By = i mean congruent.What i did so far, was trying to solve it with the Chinese remainder theorem.But the problem is, that the factors of 125 should be coprime. Maybe can help me out with this .

• Don't be surprised to see [on hold] now.
– user27670
Dec 3 '15 at 16:29
• This is a site for the computing software Mathematica. Perhaps you want to post on Mathematics (although this question is likely to be automatically migrated there).
– march
Dec 3 '15 at 16:55
• CRA does not apply in this case. After solving mod 5 (solution is 4 as you may have found), it requires two rounds of what's called "Hensel lifting". [Round 1: to bump from 5 to 5^2, set solution to 4+5*k. Expand (12*(4 + 5 k) - 13) and see it is divisible by 5. Divide out 5, solve what you have for k mod 5. Round 2: Rinse and repeat.] Dec 3 '15 at 17:14

As usual @DanielLichtblau has given a solution in his comment which develops understanding. If, however, you are simply looking for a Mathematica black-box solution, then Reduce with a Modulus option can give you that.
Reduce[12x==13,x,Modulus->125]

which returns x==74.