Interactive · 2 questions
Modulo Arithmetic : Fermat's Little Theorem and some miscellaneous theorems
I'm sure you've heard about Fermat's Last Theorem.
Don't worry, I'm not going to talk about that. Instead, Fermat's little theorem states that :
Fermat's Little Theorem states that
Let be a prime and let be a positive integer. Then,
.
Equivalently, if , we can write it as
, by dividing both sides by .
What's that? You say why can I divide by . Didn't I say dividing both sides is not valid? Am I contradicting myself? Am I wrong this whole time?
Calm down. Since is a prime and means that . So, we can divide both sides by .
So, how does this seemingly bizarre theorem true? There're many proofs of this theorem. (You can find some of them here)
We'll show a proof using the following fact :
If is a prime and , then the numbers
are distinct in . (i.e. their remainders when divided by are distinct)
Indeed, this is easy to proof. Suppose not, then let for some distinct . Then, we have . Since , we can divide both sides by to get or . But this implies , a contradiction.
Now, since their remainders are distinct, we can say that the sets
and are equal modulo .
So, the product of their elements must be equal modulo , or
.
But evidently, . So, we can divide both sides by to get
.
This proves the theorem. .
Some other theorems
Wilson's Theorem
Wilson's Theorem states that if is a prime then
.
Note that the converse is not true!
Euler's Theorem
This is just a generalization of Fermat's Little Theorem. It states that
For every positive integer and such that ,
, where is the Euler's totient function.
Since , this theorem is in fact a generalization of Fermat's Little Theorem.