Need to prove divisibility of $7^p-5^p-2$ by $3$ by using Fermat's little Theorem

63 Views Asked by At

Let $p > 2$ be a prime number. Prove that $$7^p-5^p-2$$ can be divided by $6p$. I have already proved that it can be divided by $2$ and $p$, but how can I prove that it can be divided by $3$ ?

2

There are 2 best solutions below

0
On

We have $7^{p}-5^{p}-2\equiv 1-(-1)-2=0\pmod 3$.

0
On

Fermat's little theorem asserts that if $p$ is prime, then for every integer $n$, we have :

$$n^p-n\equiv 0\quad (mod\,p)$$

Since $5$ and $7$ are primes : $$7^p-5^p-2=(7^p-7)-(5^p-5)\equiv0\quad(mod\,p)$$

But $p$ is also odd, so that the relation : $7^p-5^p-2\equiv1-(-1)^p-2\quad (mod\,6)$ takes the form : $$7^p-5^p-2\equiv0\quad(mod\,6)$$

At this point, we have proven that if $p$ is an odd prime, then $p\mid(7^p-5^p-2)$ and $6\mid(7^p-5^p-2)$

If $p>3$, then $\gcd(p,6)=1$ and we conclude that $6p\mid(7^p-5^p-2)$.

And if $p=3$, then a direct calculation shows that $$7^3-5^3-2\equiv(7\times(-5))-5\times(7)-2=72\equiv0\quad(mod\,18)$$