Let are integers

  • if there is an integer such that , then we say a divides b
    • a is a factor of b
    • b is a multiple of a
  • If remainder is 0, then
  • if and , then
  • if then for all int
  • if and then

“Assume . Then by def. divides s.t.

Division Algorithm

“Not an algorithm” The Division Algorithm: Suppose a is an integer and d is a positive integer. There are unique integers q and r, with 0 ≤ r < d, such that a=dq+r

  • d is the divisor
  • a is the dividend
  • q is the quotient
  • r is the remainder

Note the following:

  • q = a div d is used to express the quotient
  • r = a mod d is used to express the remainder.