2

Fermat's Little Theorem states that (acc to Gallian book)

$a^p \mod p= a \mod p$.

Does it mean that we get the same remainder when both $a^p$ and $a$ are divided by some prime $p$? I am quite confused about this statement. Through wikipedia, I read $a^p \equiv a \mod p$. Kindly help. I am new to this number system topic.

monalisa
  • 4,460

2 Answers2

2

$a^p\mod p\equiv a \mod p\implies a^p-a\equiv 0 \mod p \implies p\text{divides} (a^p-a)\implies a^p-a=kp\implies a^p=kp+a$

So what is the remainder when $a^p$ is divided by $p$

Learnmore
  • 31,062
2

As you already know that fermet's little theorem states that $a^p \mod p= a \mod p$. It is equivalent to $p|(a^p)-a$ or simply $(a^p)-a=pk$ for some integer $k$.

Now your question is that:

Does it mean that we get the same remainder when both $a^p$ and a are divided by some prime p??

My answer is Yes.

Consider an example : As 6 divides 30, we can say that 6|35-5, but notice that 6 neither divide $35$ nor $5$,but $6$ divides $35-5$ because $5$ and $35$ give remainder $5$ when they are divided by $6$.

I shall let you conclude from here.