 A useful result in higher mathematics is known as the pigeonhole principle. And as a curiousness follows, suppose you have a bunch of pigeons, and you want to put them into a bunch of pigeonholes. If you have more birds than places to put them, then at least one of the pigeonholes must contain at least two birds. So with four pigeons and three pigeonholes, then at least one pigeonhole must have at least two pigeons. So mathematically at least, we can state the theorem as follows. Suppose k items are to be placed in n bins with k greater than n. Then at least one of the bins must contain more than one item. Since this is a theorem, we should prove it. And in fact, unless I prove some things, I'll get my mathematician card revoked. So we'll prove it by contradiction. Suppose no bin has more than one item. Since there are n bins, this means we can place at most n items. But k is greater than n, so there are some items that haven't been placed. Consequently, our assumption has to be false, and there is at least one bin with more than one item. The key to using the pigeonhole principle is to find the bins. It's useful to think of the bins as the places we sort into. For example, let's try to prove that for any hole number a, and any non-zero hole number q, there must be m and n, where a to m minus a to n is divisible by q. So a useful question to ask is, what if it isn't? In this case, suppose our difference isn't divisible by q for any m or n. There must be some remainder, and that remainder has to be somewhere between 1 and q minus 1. Now since the pigeonhole principle relies on there being more items than bins, let's make these remainders the bins. This gives us q minus 1 bins, so we'll want q or more values to be categories by the remainder on division by q. Now another useful idea to keep in mind is to change one thing at a time. There's two exponents, m and n, so let's fix n. Say we'll make it equal to 1, and consider the remainders of an a minus a, a squared minus a, a q minus a, and so on, are divided by q. Now the first is divisible by q, so we're done. Wait a minute, that can't be everything. And if you really want to understand mathematics, it's important to remember, don't stop with the easy cases. So let's ignore this first one. And if you omit the first one, that if any of the rest are divisible by q, we're done. Well, those were the easy cases, so if none of these are divisible by q, then at least two will have the same remainder. So remember, definitions are the whole of mathematics, all else is commentary. If two things have the same remainder, that must mean there's something times the divisor plus that remainder, and so we can write. Now, since both of these have an a and an r in them, it might be helpful to subtract one from the other. And if in doubt, expand or factor, and this means that for some m and m prime, the difference is divisible by q. It's useful to remember the last line is what you've actually proven, and it's not quite all we want to prove, but go ahead and rewrite the question. We'll change from a m minus a n to a m minus a m prime. Now, at this point, we'll introduce the following idea. To really understand mathematics and to be able to do more mathematics more easily, there are two useful strategies. There's a strategy of Leonard Euler, consider the corollaries, and there's a strategy of Carl Friedrich Gauss, prove it again. Now, we've proven the difference is divisible by q, and if in doubt, we can expand or factor, and so this can be factored as. Now, the exponent is this different m minus m prime, and it could be negative. And we shouldn't fear negative numbers, but you might as well avoid them if you can. And in fact, in this case, without loss of generality, we'll assume that m is greater than m prime. And since q divides the product, q must divide one of the factors. Or will it? And the thing to remember is that if you don't find the flaws in your reasoning, someone else will. So let's try an example. Well, we note that four divides 20, but if we write 20 as a product two times five, four divides neither factor. Question in the back. But 20 isn't two times five. Ah, yes, that's true. So if we wrote 20 as four times five, we find that four divides neither, but about 20 equals two times 10. Now, this factorization property does hold true for prime numbers because primes can't be broken. So if a prime divides a product, it must divide one of the factors, and so this gives us the following corollary. If q is prime and does not divide a, then it must divide a to k minus one for some k. So that's the Euler strategy. The Gauss strategy is to find a new proof. Yes, yes, Euler also reproved things many times. So let's try to find another proof. Since we're looking at the remainders when a difference of powers is divided by q, we might consider the remainders when the powers are divided by q. So let's consider the remainders by the terms of the infinite sequence are divided by q by the same reasoning, at least two terms have to have the same remainder, say a m and a m prime, and so, and so again, our difference is divisible by q.