I have the problem $6 \mod 18$. I read the equation $n=qm+r$ online, where $n$ is your number to be converted, $m$ is your mod, and $r$ is your remainder. I read that for negative numbers, $qm<n$ and otherwise $q$ is the greatest number that goes into $n$ without going over $n$, i.e., what you'd get if you divided normally. So I plugged it in: $6=18q+r$, and I thought that $q$ would be $\frac{1}{3}$ and $r=0$, and so $0$ is the solution. The answer is $6$, and I don't know what I did wrong. Could I have some guidance?

  • 1
    $\begingroup$ In your division rule, $q,r\in \mathbb Z$. In this case, $q=0,r=6$. $\endgroup$ – lulu Oct 4 '16 at 22:28
  • $\begingroup$ $q,r$ must be both integers, with the remainder $0 \le r \lt m$. In your case $6 = 0 \cdot 18 + 6$. $\endgroup$ – dxiv Oct 4 '16 at 22:28

No, $q$ and $r$ must be integers, so the solution is $(0, 6)$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.