Fermat little theorem example

220 Views Asked by At

I've just learned about Fermat's little theorem and doing some examples. If prime number P is 31 and the integer number a is 11 then the residual will be 25. Where am I wrong? Thanks

3

There are 3 best solutions below

0
On

No, for $a^p=a\pmod{p}$ we have $$11^{31}=11\pmod{31}.$$

0
On

How can we tell where you are wrong? You didn't show us your computations.

Anyway, $11^2\equiv-3\pmod{31}$ and $11^3\equiv-2\pmod{31}$. Therefore, $11^5\equiv6\pmod{31}$. It follows from this that $11^{10}\equiv5\pmod{31}$. Since $11^5\equiv6\pmod{31}$ and $11^{10}\equiv5\pmod{31}$, $11^{15}\equiv-1\pmod{31}$. So, $11^{30}\equiv1\pmod{31}$, as it should be.

0
On

You aren't following what the theorem says. It says $a^{p-1}\equiv 1\bmod p$, so in this case $11^{30}\equiv 1 \bmod 31$. we can use some of our exponent rules to figure out if this is true. $11^{30}=11^{5\cdot 2\cdot 3}={((11^2)^3)}^5 \equiv (28^3)^5 \bmod 31\equiv (-3^3)^5\bmod 31\equiv -27^5\bmod 31\equiv 4^5\bmod 31$ $\equiv 1024 \bmod 31\equiv1\bmod 31$