0
$\begingroup$

I tried doing an example where $a = 10$ and $m = 4$ but I get this

$10 \equiv (10 mod 4) mod 4$

$10 \equiv 2 mod 4$

$10 \equiv 0$ ??

Is that logic not correct? What am I doing wrong?

$\endgroup$
  • $\begingroup$ Change the title It's weird looking $\endgroup$ – wesssg Dec 6 '16 at 3:38
  • $\begingroup$ MathJax hint: if you put slashes before functions, you get the right font and spacing. For mod, \pmod get the modulus plus puts it all in parentheses, so 10 \pmod 4 gives $10 \pmod 4$. bmod omits the parentheses, so 10 \bmod 4 gives $10 \bmod 4$. If the modulus is multiple characters, put it in braces. $\endgroup$ – Ross Millikan Dec 6 '16 at 3:42
1
$\begingroup$

If the percent sign is the modulus operator, as it is in some programming languages, $2\%4=2,$ not $0$ so $10 \equiv 2 \pmod 4$ and all is well

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ I edited the title it should be updated now to a is equivalent to (amodm)modm $\endgroup$ – James Mitchell Dec 6 '16 at 3:49
0
$\begingroup$

Note $\ a = \bar a + q\,m,\,\ $ for $\,\bar a = (a\bmod m),\, $ by dividing $\,a\,$ by $\,m\ $ [Division Algorithm]

Thus $\ a\equiv \bar a \pmod m\ $ by definition, $ $ i.e. since $\ m\mid a-\bar a\ $ by above.

| cite | improve this answer | |
$\endgroup$

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.