# Modular arithmetic with a variable modulus and fractions

1. Nov 17, 2012

### Floating Info

(This is my first post.)

I can't seem to find a good way of solving this sort of congruence for x:

x^2 / 3 + 11 $\equiv$ 5 (mod x)

Through trial and error it appears at least 3 and 6 are answers, but how can you reach them regularly? (I'm heard conflicting things about fractions being defined for modular arithmetic. It might be that this isn't even a createable congruence.)

2. Nov 17, 2012

### haruspex

If the denominator is prime to the base then it's always defined. Otherwise, only when the HCF of denominator and base happens to divide the numerator in the ordinary way:
1/3 (6) does not exist because there is no number x s.t. 3x$\equiv$1 (6).
6/15 (9) is ok because HCF(15,9) = 3, which cancels to produce 2/5 (9) = 4.
Just multiply it out and see what you get.