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.
Welcome class! Today, we're diving into Fermat's Little Theorem. Can anyone tell me what the theorem states about prime numbers?
I think it says something about how a number raised to a power gives a specific result when divided by a prime.
Exactly! Specifically, if p is a prime and a is an integer not divisible by p, we have a^(p-1) ≡ 1 (mod p). This is a crucial theorem in number theory!
Why is it important in primality testing?
Great question! We use it to test if a number is prime by checking if for a co-prime integer b, b^(n-1) ≡ 1 (mod n). If it fails, n is composite.
Now, let's consider how we use this theorem in practice. Suppose we want to check if n is prime.
Do we just pick any number co-prime to n?
Exactly! For instance, choose a base b. We then compute if b^(n-1) ≡ 1 (mod n).
What if it gives us that result?
If it does, we can't be sure n is prime yet—it's also possible that n is a pseudo prime.
Moving on, let's discuss Carmichael numbers. Who can give me an example?
Isn't 561 a Carmichael number?
Indeed! 561 is a composite number but satisfies Fermat's condition for all bases co-prime to it.
So, does that mean we can't trust Fermat's theorem for primality testing?
Exactly! It highlights the limitations of relying solely on this theorem for true primality testing.
Given the existence of Carmichael numbers, what do you think we need to do to improve our primality tests?
We should have more than one test, right?
Yes! We need to incorporate additional tests to confirm the primality of n, not solely rely on Fermat's theorem.
What kinds of tests can we use?
Other methods like the Miller-Rabin test are more reliable for confirming the primality.
Indicates that for any prime p, if a is co-prime to p, then a^(p-1) ≡ 1 mod p.
A method to test if a number is prime by checking b^(n-1) ≡ 1 mod n.
Special composite numbers that appear prime under Fermat's theorem.
Composite numbers that satisfy Fermat's condition for certain bases.
If p is prime, then do not fear, a power of a, you’ll see it clear, raised to p-1 with a perfect cheer, equals one, that’s what we hold dear.
Imagine a kingdom called Fermatia ruled by a wise King Prime. All leaders (numbers) must follow the rule—if they can raise their strength to the total knights minus one without losing to their foes (the modulus), they are considered strong (prime). However, some imposters like the cunning Carmichael sneak past the gates! They seem strong but are not really true heroes.
Remember: F is for Fermat, P for Prime, C for Carmichael - not a number you want to climb!
F.C.P.: Fermat's Little Theorem, Composite exceptions, Prime testing.
Term
Fermat's Little Theorem
Click to flip
Term
Carmichael Number
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).
The process of determining whether a given number is prime.
Composite numbers that satisfy Fermat's Little Theorem for every base that is co-prime to them.
Composite numbers that satisfy the condition b^(n-1) ≡ 1 (mod n) for some base b co-prime to n.
This section discusses Fermat's Little Theorem, its application in primality testing, and introduces the concept of Carmichael numbers.
Fermat's Little Theorem serves as a foundational principle in number theory, particularly in primality testing. The theorem states that if p is a prime and a is an integer not divisible by p, then a^(p-1) ≡ 1 (mod p). The section also discusses the limitations of this theorem highlighted by Carmichael numbers, which are composite numbers that can mistakenly appear prime under Fermat's criterion.
Fermat's Little Theorem states that for a prime number p and an integer a which is co-prime to p, it holds that a^(p-1) ≡ 1 (mod p). This theorem is significant in number theory and has practical applications in primality testing.
To test whether a number n is prime, we can randomly choose an integer b co-prime to n and verify if b^(n-1) ≡ 1 (mod n). If this condition is false, then n is declared composite. However, if it's true, n could either be prime or a composite number known as a pseudo prime. One notable example of a pseudo prime is 341, which is composite but satisfies Fermat's condition for certain bases.
Carmichael numbers are composite numbers that fulfill the theorem's requirements for all bases co-prime to them, rendering them indistinguishable from primes under this testing framework. An example of a Carmichael number is 561, which proves to be a pseudo prime regardless of the base selected. This reveals significant limitations in the reliance on Fermat's Little Theorem for primality testing and suggests the need for additional testing methods.