Modulo Operation/Examples/100 mod 3

From ProofWiki
Jump to navigation Jump to search

Theorem

$100 \bmod 3 = 1$

where $\bmod$ denotes the modulo operation.


Proof

By definition of modulo operation:

$x \bmod y := x - y \left \lfloor {\dfrac x y}\right \rfloor$

for $y \ne 0$.


We have:

$\dfrac {100} 3 = 33 + \dfrac 1 3$

and so:

$\left\lfloor{\dfrac {100} 3}\right\rfloor = 33$


Thus:

\(\displaystyle 100 \bmod 3\) \(=\) \(\displaystyle 100 - 3 \times \left\lfloor{\dfrac {100} 3}\right\rfloor\)
\(\displaystyle \) \(=\) \(\displaystyle 100 - 3 \times 33\)
\(\displaystyle \) \(=\) \(\displaystyle 1\)

$\blacksquare$


Sources