Skip to main content

Number operations

Denote by [m]={0,1,,m}[m] = \{0,1,\ldots, m\}. Recall the notation aba \mid b "aa divides bb", meaning (kZ)b=ak(\exists k \in {\mathbb Z}) b = a k. Also, the congruent notation ab(modm)a \equiv b \pmod{m} ("aa is congruent to bb modulo mm"), which means m(ab)m \mid (a-b). Modular arithmetic deals with relations under this modulo notation. Another name for modular arithmetic is "calendar arithmetic", e.g., 361(mod7)36 \equiv 1 \pmod{7} implies that, if today is Sunday, then 3636 days from now will be Monday.

Exercise 42

Prove that \equiv under modulo qq is an equivalence relation.

Exercise 43

If ac(modm)a \equiv c \pmod{m} and bd(modm)b \equiv d \pmod{m}, then a+bc+d(modm)a + b \equiv c+d \pmod{m} and abcd(modm)ab \equiv cd \pmod{m}

The above exercise allows us to have an easier time working in modular arithmetic. For instance, if we want to find the last digit of number 1110011^{100}, we could simply write 111(mod10)11 \equiv 1 \pmod{10} and then we can raise both sides to the power of 100100, which gives us 111001(mod10)11^{100} \equiv 1 \pmod{10}. The last digit of this number is 11!

Exercise 44

What is the last digit of 99910001999^{10001}? Prove your answer.