[Math] Find the remainder when $787^{777}$ is divided by $100$

elementary-number-theory

Find the remainder when $787^{777}$ is divided by $100$?

MyApproach

$787^{20\times38+17}$=$787^{17}$=I will get the last digit of remainder as 7 but how to calculate tens digit in this question fast using this approach only.

Similarly,Find the remainder when $948^{728}$ is divided by $100$.

On solving I get $948^8$=I will get the last digit of remainder as 7 but how to calculate tens digit in this question fast using this approach only.

Again here how to calculate the other digits fast.

Best Answer

Hint

$787^3 \equiv 03\pmod {100}$ and $3^{20} \equiv 01 \pmod {100}$

Now the problem becomes much simpler. The last two digits of $787^{780}$ are $01$. You can now easily work backwards.

Other Problem

You can tackle it similarly by observing

$948^2 \equiv 04\pmod {100}$ and $4^{16} \equiv 04 \pmod {100}$

(You are not going to be lucky because with an even number, you will never get a $01$)

Edit - Alternately for first problem

You can use Fermat's little theorem, knowing $\phi(100) = 40$.

So any number, relatively prime with $100$, raised to $40$ will give $01$ and hence the last two digits of $787^{780}$ are $01$

Related Question