Lesson 1: Divisibility & Prime Numbers
What You'll Learn
This lesson introduces the foundational ideas of number theory: divisibility, the Division Algorithm, prime and composite numbers, and basic properties of primes that will be used throughout the course.
Definition
Divisibility
Let with . We say divides (written ) if there exists an integer such that:
We also say is a divisor (or factor) of , and is a multiple of .
If does not divide , we write .
Examples: (since ), but .
We also say is a divisor (or factor) of , and is a multiple of .
If does not divide , we write .
Examples: (since ), but .
Let .
1. Reflexivity: for all .
2. Transitivity: If and , then .
3. Linearity: If and , then for all .
4. Comparison: If and , then .
5. If and , then .
1. Reflexivity: for all .
2. Transitivity: If and , then .
3. Linearity: If and , then for all .
4. Comparison: If and , then .
5. If and , then .
Divisibility is transitive and respects linear combinations — key facts used in every proof.
Ex
Example — Proving a Divisibility Statement
Prove: If , then .
Solution Steps
For any integers and with , there exist unique integers (quotient) and (remainder) such that:
We write (integer quotient) and (remainder).
Example: : , so .
We write (integer quotient) and (remainder).
Example: : , so .
Every integer can be uniquely expressed as bq + r with 0 ≤ r < b. This is the basis of modular arithmetic.
Ex
Example — Division Algorithm
Find the quotient and remainder when is divided by .
Solution Steps
Definition
Prime & Composite Numbers
An integer is prime if its only positive divisors are and itself.
An integer that is not prime is called composite — it can be written as where .
By convention, is neither prime nor composite.
The first few primes:
Note: is the only even prime.
An integer that is not prime is called composite — it can be written as where .
By convention, is neither prime nor composite.
The first few primes:
Note: is the only even prime.
Theorem (Euclid, c. 300 BCE): There are infinitely many prime numbers.
Proof (by contradiction): Suppose there are only finitely many primes: . Consider:
is not divisible by any (since dividing gives remainder ). So either is prime, or has a prime factor not in our list. Either way, we have a prime not in the list — contradiction. ∎
Proof (by contradiction): Suppose there are only finitely many primes: . Consider:
is not divisible by any (since dividing gives remainder ). So either is prime, or has a prime factor not in our list. Either way, we have a prime not in the list — contradiction. ∎
One of the most elegant proofs in mathematics: multiply all known primes and add 1 to get a contradiction.
Every integer has at least one prime divisor. Moreover, if is composite, then has a prime divisor .
Proof of the second part: If with , then , so . Since , has a prime divisor . ∎
This gives us a primality test: to check if is prime, only test divisors up to .
Proof of the second part: If with , then , so . Since , has a prime divisor . ∎
This gives us a primality test: to check if is prime, only test divisors up to .
To check primality of n, you only need to check prime divisors up to √n.
Ex
Example — Testing Primality
Is prime?
Solution Steps
The Sieve of Eratosthenes
To find all primes up to :
1. List all integers from to .
2. Start with the smallest unmarked number (). Circle it as prime.
3. Cross out all multiples of (except itself).
4. Move to the next unmarked number (). Circle it.
5. Cross out all multiples of .
6. Repeat until you've processed all primes up to .
7. All remaining unmarked numbers are prime.
This ancient algorithm (c. 240 BCE) is remarkably efficient and still used in practice.
1. List all integers from to .
2. Start with the smallest unmarked number (). Circle it as prime.
3. Cross out all multiples of (except itself).
4. Move to the next unmarked number (). Circle it.
5. Cross out all multiples of .
6. Repeat until you've processed all primes up to .
7. All remaining unmarked numbers are prime.
This ancient algorithm (c. 240 BCE) is remarkably efficient and still used in practice.
?
Practice ProblemFind the quotient and remainder when is divided by . What is the remainder?
?
Practice ProblemIs prime or composite?
?
Practice ProblemIf and , does ?
?
Practice ProblemIn Euclid's proof, if we take primes and form , is prime?
1 / 5