Calculating last digit of a number using binomial theorem

551 Views Asked by At

How to calculate the last digit of a number say like $$\large 3^{4^{5}}$$ using binomial theorem?

P.S:I know how to solve it using modular arithmetic.

I saw this one but its not of much use in this case.

2

There are 2 best solutions below

0
On

Let me try. $$3^{4^5} = 3^{1024} = (3^2)^{512} = (10-1)^{512} = \sum_{i=1}^{512} {512 \choose i} 10^i (-1)^{512-i} + (-1)^512 \equiv 1 (\mbox{ mod } 10).$$

Check it by modular arithmetic:

$$3^2 \equiv -1 \mbox{ (mod }10),$$

then, $3^{1024} \equiv 1\mbox{ (mod }10)$.

1
On

Binomial is too much time taking approach. I will go with traditional approach by calculating smaller powers & guessing larger later