You are on page 1of 4

4.

1
Divisibility and Modular Arithmetic
Division of an int by a pos int -> quotient and remainder
-working with these remainders = modular arithmetic
Division
Definition 1:

The Division Algorithm


When an integer is divided by a positive integer, there is a quotient and a remainder, as the
division algorithm shows.

Primes
Every Int > 1 is divisible by at least two ints. Positive ints that have exactly two different positive

int factors = prime.


The primes are the building blocks of positive ints, as the fundamental theorem of arithmetic will
show.

Primality Testing

Sieve of Eratosthenes

You might also like