 So this problem of determining whether a number is prime leads to the following approach. And we frequently refer to this as a witness and alibi approach. So, for example, n equals 340, we tried to apply the Euler-Firma theorem. We found 2 to the power of 341 minus 1 is congruent to 1, which suggested that 341 is prime. But when we tried a different base, we found that 3 to the power of 341 minus 1 was not congruent to 1, which guaranteed that it was composite. And so we have the following approach. We'll pick several hundred values of a base, all relatively prime to the number we're testing. We'll evaluate a to the power of n minus 1 mod n. And if that is not congruent to 1, again, the Euler-Firma theorem tells us that the number is composite, we'll say that a is a witness, that n is composite, and we're done. We don't have to do anything else. On the other hand, if all of these powers are congruent to 1, then we will conclude, at least tentatively, that n is a prime number. Remember that if any of them is not congruent to 1, the number is guaranteed to be composite. So a is a witness that n is composite. If they're all congruent to 1, there's no evidence that the number is composite, but at the same time, there's not really evidence that the number is prime other than we haven't definitively concluded that it's composite. Now, there's no standard term for this, for this value that's going to make the congruence equal to 1, but by analogy, we have witnesses that it's composite, we have alibis that the number is prime. So the idea here is that we either have a witness that says this number that we're working with is a composite number, or we have a bunch of alibis that are pretty sure that the number is prime. For example, let's take a look at that. So I have this number n equals 389, and let's see if I can determine whether the number is prime or not. So I'll pick a couple of numbers that are relatively prime to 839. 2, 3, 5, they are not divisors, so I can use them. I can evaluate these to power 839 minus 1 mod 839, and I find that all three of them are congruent to 1. So 2, 3, and 5 are all alibis that 839 is prime. There is no evidence yet that 839 is a composite number. Does this guarantee 839 is prime? No, not really, but the existence of multiple alibis for the primality of the number is suggestive. But of course, alibis don't necessarily guarantee anything. So let's consider a number like 1729. Now I'm going to find that 2 to power 1728 congruent to 1, 3 to power 1728 also congruent to 1, 5 to power 1728 congruent to 1, and so on. I have a bunch of alibis that 1729 is prime. 2, 3, and 5 all say yes, this is a prime number. However, the number is composite. It's 7 times 13 times 19. So here's a problem with this approach. First of all, there are numbers. There's an infinite number of them. That's actually a theorem from number theory. There's an infinite number of numbers that satisfy this congruence, a to n minus 1 congruent to 1, for all numbers that are relatively prime. And a number that does that is called a Carmichael number, and there's an infinite number of such Carmichael numbers. And what this means is that we can't use the Euler Fermat theorem by itself as a way of identifying whether a number is composite or prime. We have to do something else. And we'll take a look at that next time.