Search the courses, subjects, tracks, games and features, or jump straight to a page.
Learn it your way
A short class with Sarah and her students. The other ways are under More.
Sign up free to listen. Transcripts are free to read.
Let's start with Fermat's Little Theorem. Can anyone tell me what the theorem states?
It relates to prime numbers and shows how exponentiation behaves with them, right?
That's correct! Specifically, if 'p' is a prime and 'a' is an integer not divisible by 'p', then a^(p-1) ≡ 1 (mod p). We can remember this as... 'P is Prime, A is Co-Prime = A to P-1 is One!'
What does 'co-prime' mean?
Great question, Student_2! 'Co-prime' means the greatest common divisor of 'a' and 'p' is 1. They share no common factors.
Can you give an example?
Sure! If we take a = 2 and p = 5, they are co-prime, and 2^(5-1) = 16, which gives us 1 when calculated modulo 5. So, 16 ≡ 1 (mod 5).
Now, let's address the corollary of Fermat's Little Theorem. Does anyone remember what it states?
If 'p' divides 'a', then a^p ≡ a (mod p)?
Exactly! This corollary holds true for every integer 'a' regardless of co-primality with 'p'. Let’s see the proof quickly.
How do we prove it?
We analyze two cases: if 'p' divides 'a' directly, and if it does not. For the first case, since 'a' = kp, where 'k' is an integer, then a^p is clearly divisible by p. Thus, a^p ≡ 0 ≡ a (mod p).
And what about when 'p' doesn't divide 'a'?
In this case, we can apply Fermat's theorem directly to show that a^p ≡ a (mod p) as before. It expands our understanding significantly!
Next, let's discuss how we can use Fermat's Little Theorem to test for primality. Who can summarize how this is done?
We pick a number 'n' and a base 'b' that is co-prime to 'n', and check if b^(n-1) ≡ 1 (mod n).
Exactly! But there are pitfalls as well. What if the theorem holds, but 'n' is composite?
Oh, that can happen with Carmichael numbers, right?
Yes! Carmichael numbers are composite yet satisfy the theorem for all bases co-prime to them, creating a false positive in our tests.
Can we trust the results then?
Not entirely. If Fermat's theorem fails, we can say 'n' is composite, but not if it passes. Hence further tests are needed.
Let’s explore Carmichael numbers by example. Who can recall one we discussed?
561 is one!
Correct! Now, to check if 561 is a Carmichael number, what must we demonstrate?
We need to prove that b^(560) ≡ 1 for every base 'b' that is co-prime to 561.
Precisely! Let’s run through this proof together, using the prime factors of 561 — what are they?
3, 11, and 17!
Exactly! Using the properties of these primes, Fermat's theorem asserts that for any 'b', we will always find b^(560) ≡ 1 for any co-prime base.
So it’s guaranteed, no matter what base we choose?
Yes! That primarily is what defines Carmichael numbers. So, always be cautious when using n in primality testing.
A crucial theorem for understanding the properties of prime numbers and modular arithmetic.
A vital concept in number theory, indicating that two numbers have no common divisors save for 1.
Techniques derived from Fermat's theorem assist in establishing whether a number is prime.
Special composite numbers that can mislead primality tests, essential to understanding test limitations.
For primes, it's easy to see, a^p-1 is one, whee!
Once upon a time in math land, Fermat discovered that if you took a prime and an integer that didn't fight, their powers would always align, making everything seem just right.
If it's prime (P), and a's co-prime (C), then a to the P minus one is one (1). PC = 1!
Fermat's Rule: P = Prime, C = Co-Prime, A = Always One.
Term
Fermat's Little Theorem
Click to flip
Term
Carmichael Numbers
Click to flip
Term
Co-prime
Click to flip
Term
Primality Testing
Click to flip
Term
Modulo
Click to flip
A theorem stating that if 'p' is a prime and 'a' is an integer not divisible by 'p', then a^(p-1) ≡ 1 (mod p).
Two integers 'a' and 'b' are co-prime if their greatest common divisor (GCD) is 1.
Composite numbers that pass Fermat's test for all bases co-prime to them, behaving like primes.
The process of determining whether a given number is prime.
An arithmetic operation that finds the remainder when one integer is divided by another.
Fermat's Little Theorem is critical for primality testing and establishes that if a number is prime, certain mathematical properties hold.
This section explores Fermat's Little Theorem, which states that if 'p' is a prime number and 'a' is an integer co-prime to 'p', then a^(p-1) ≡ 1 (mod p). It also introduces a corollary of the theorem and discusses applications in primality testing, including challenges such as Carmichael numbers.
In this section, we discuss Fermat's Little Theorem, which states that for a prime number 'p' and an integer 'a' such that p does not divide a (i.e., a and p are co-prime):
This theorem suggests that exponentiation of co-prime integers retains specific modular properties relevant for number theory and cryptography.
The theorem's corollary applies even when 'a' is not co-prime to 'p': If p divides a, then:
a^p ≡ a (mod p).
Transitioning further, we explore Carmichael numbers, composite numbers that satisfy the conditions of Fermat’s theorem for all co-prime bases, therefore representing a challenge in primality testing. An example of a Carmichael number is 561.
This exploration underlines the practical uses and limitations of Fermat's theorem in computational number theory.