By Fermat's Little Theorem is divisible by 5, if is not divisible by 5
Fermat's Little Theorem states that:
Given a prime and a natural number coprime to
I need to show that if p is an odd prime not equal to 5, then either or is divisible by 10. It was trivial to show that they were both divisible by 2, so all that's left is to show one of them must be divisible by 5. I tried this a couple of different ways. First, I tried to assume one was not divisible by 5, and prove that the other one was. I also multiplied them together and tried to show that was divisible by 5, since there is a theorem that states if p is prime and p divides ab, then p divides a or p divides b. However, I got stuck using both methods. Any help would be greatly appreciated.
Consider the sequence of integers . These are 5 consecutive integers, so exactly one of them is divisible by 5. Hence their product, which is , is divisible by 5. But . Therefore is divisible by 5. Since 5 is prime, this means that one of and must be divisible by 5. In the latter case, is divisible by 5.
And as you’ve pointed out, they’re both divisible by 2; hence whichever of them is divisible by 5 is divisible by 10.
Examining every possible situation
(p is not 5)
Now where and are natural numbers,
So
Now you have to show that one of this factors is divisible by five for b=1,2,3,4
Indeed if b=1, then 5a+b-1=5a which is divisible by 5
If b=2 then 25a²+5ab+2²+1= 25a²+5ab+5 also divisible by 5
If b=3 then 25a²+5ab+3²+1= 25a²+5ab+10 divisible by 5
If b=4 then 5a+b+1= 5a+5 divisible by 5
We have shown that is divisible by 5 whenever p is not divisible by 5